1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 02:10:45 +00:00

LibWeb: Add ref test for background-repeat

This is adapted from one of our existing test pages.
This commit is contained in:
Sam Atkins 2023-11-16 12:42:13 +00:00 committed by Sam Atkins
parent d10f4a8590
commit 69afb43922
7 changed files with 93 additions and 0 deletions

View 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>

View 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>

View 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>

View 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>

View 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>

View 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">

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB