Skip to content

Commit

Permalink
Base: Add test page for the 'background-repeat' property
Browse files Browse the repository at this point in the history
This page tests the following values for background-repeat:
    repeat, repeat-x, repeat-y, no-repeat

The test is duplicated for the <body> node and for child <div> nodes,
because the code that paints these nodes are in separate locations.
  • Loading branch information
trflynn89 authored and awesomekling committed Apr 3, 2021
1 parent 2601441 commit fcfeada
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Base/res/html/misc/background-no-repeat.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<style>
body {
background: white url("background-repeat.png") no-repeat;
}
</style>
<body></body>
54 changes: 54 additions & 0 deletions Base/res/html/misc/background-repeat-test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<style>
body {
background: cyan;
}
iframe {
width: 200px;
height: 200px;
}
.float {
float: left;
}
.background {
background: white url(background-repeat.png);
width: 200px;
height: 200px;
}
</style>
<body>
<h1>Body Background</h1>
<div style="overflow: hidden">
<div class=float>
<h2>repeat</h2>
<iframe src="background-repeat.html"></iframe>

<h2>repeat-x</h2>
<iframe src="background-repeat-x.html"></iframe>
</div>
<div class=float>
<h2>no-repeat</h2>
<iframe src="background-no-repeat.html"></iframe>

<h2>repeat-y</h2>
<iframe src="background-repeat-y.html"></iframe>
</div>
</div>

<h1>Element Background</h1>
<div style="overflow: hidden">
<div class=float>
<h2>repeat</h2>
<div class=background style="background-repeat: repeat"></div>

<h2>repeat-x</h2>
<div class=background style="background-repeat: repeat-x"></div>
</div>
<div class=float>
<h2>no-repeat</h2>
<div class=background style="background-repeat: no-repeat"></div>

<h2>repeat-y</h2>
<div class=background style="background-repeat: repeat-y"></div>
</div>
</div>
</body>
6 changes: 6 additions & 0 deletions Base/res/html/misc/background-repeat-x.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<style>
body {
background: white url("background-repeat.png") repeat-x;
}
</style>
<body></body>
6 changes: 6 additions & 0 deletions Base/res/html/misc/background-repeat-y.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<style>
body {
background: white url("background-repeat.png") repeat-y;
}
</style>
<body></body>
6 changes: 6 additions & 0 deletions Base/res/html/misc/background-repeat.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<style>
body {
background: white url("background-repeat.png") repeat;
}
</style>
<body></body>
Binary file added Base/res/html/misc/background-repeat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Base/res/html/misc/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h1>Welcome to the Serenity Browser!</h1>
<p>This page loaded in <b><span id="loadtime"></span></b> ms</p>
<p>Some small test pages:</p>
<ul>
<li><a href="background-repeat-test.html">background image with repetition rules</a></li>
<li><a href="link-over-zindex-block.html">link elements with background box placed with z-index</a></li>
<li><a href="contenteditable.html">contenteditable</a></li>
<li><a href="clear-1.html">clearing floats</a></li>
Expand Down

0 comments on commit fcfeada

Please sign in to comment.