mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 18:15:58 +00:00
LibWeb: Add ref test for background-repeat
This is adapted from one of our existing test pages.
This commit is contained in:
parent
d10f4a8590
commit
69afb43922
10
Tests/LibWeb/Ref/assets/background-no-repeat.html
Normal file
10
Tests/LibWeb/Ref/assets/background-no-repeat.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: white url("smiley.png") no-repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<!-- HACK: Force the document to wait for the image to load -->
|
||||||
|
<img src="smiley.png" style="opacity: 0"/>
|
||||||
|
</body>
|
10
Tests/LibWeb/Ref/assets/background-repeat-x.html
Normal file
10
Tests/LibWeb/Ref/assets/background-repeat-x.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: white url("smiley.png") repeat-x;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<!-- HACK: Force the document to wait for the image to load -->
|
||||||
|
<img src="smiley.png" style="opacity: 0"/>
|
||||||
|
</body>
|
10
Tests/LibWeb/Ref/assets/background-repeat-y.html
Normal file
10
Tests/LibWeb/Ref/assets/background-repeat-y.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: white url("smiley.png") repeat-y;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<!-- HACK: Force the document to wait for the image to load -->
|
||||||
|
<img src="smiley.png" style="opacity: 0"/>
|
||||||
|
</body>
|
10
Tests/LibWeb/Ref/assets/background-repeat.html
Normal file
10
Tests/LibWeb/Ref/assets/background-repeat.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: white url("smiley.png") repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<!-- HACK: Force the document to wait for the image to load -->
|
||||||
|
<img src="smiley.png" style="opacity: 0"/>
|
||||||
|
</body>
|
38
Tests/LibWeb/Ref/css-background-repeat.html
Normal file
38
Tests/LibWeb/Ref/css-background-repeat.html
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="match" href="reference/css-background-repeat-ref.html" />
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: cyan;
|
||||||
|
}
|
||||||
|
iframe {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.background {
|
||||||
|
background: white url(assets/smiley.png);
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<iframe src="assets/background-repeat.html"></iframe>
|
||||||
|
<iframe src="assets/background-repeat-x.html"></iframe>
|
||||||
|
<iframe src="assets/background-no-repeat.html"></iframe>
|
||||||
|
<iframe src="assets/background-repeat-y.html"></iframe>
|
||||||
|
|
||||||
|
<div class="background" style="background-repeat: repeat"></div>
|
||||||
|
<div class="background" style="background-repeat: repeat-x"></div>
|
||||||
|
<div class="background" style="background-repeat: no-repeat"></div>
|
||||||
|
<div class="background" style="background-repeat: repeat-y"></div>
|
||||||
|
<div class="background" style="background-repeat: repeat repeat"></div>
|
||||||
|
<div class="background" style="background-repeat: repeat no-repeat"></div>
|
||||||
|
<div class="background" style="background-repeat: no-repeat no-repeat"></div>
|
||||||
|
<div class="background" style="background-repeat: no-repeat repeat"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
15
Tests/LibWeb/Ref/reference/css-background-repeat-ref.html
Normal file
15
Tests/LibWeb/Ref/reference/css-background-repeat-ref.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background-color: cyan;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- To rebase:
|
||||||
|
1. Open css-background-repeat.html in Ladybird
|
||||||
|
2. Resize the window just above the width of the largest element
|
||||||
|
3. Right click > "Take Full Screenshot"
|
||||||
|
4. Update the image below:
|
||||||
|
-->
|
||||||
|
<img src="./images/css-background-repeat-ref.png">
|
BIN
Tests/LibWeb/Ref/reference/images/css-background-repeat-ref.png
Normal file
BIN
Tests/LibWeb/Ref/reference/images/css-background-repeat-ref.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
Loading…
Reference in a new issue