Tests: Add CSS image-set background reftest

Cover image-set() painting through background-image with URL-backed
SVG candidates. The test verifies that an unsupported type() candidate
is skipped and the supported image/svg+xml candidate is loaded and
painted.
This commit is contained in:
Andreas Kling
2026-04-25 08:00:56 +02:00
committed by Andreas Kling
parent 61d79a1e47
commit c1fcb7dc3e
Notes: github-actions[bot] 2026-04-25 12:55:31 +00:00
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<!doctype html>
<style>
html,
body {
margin: 0;
}
.box {
width: 100px;
height: 100px;
background: green;
}
</style>
<div class="box"></div>

View File

@@ -0,0 +1,19 @@
<!doctype html>
<link rel="match" href="../expected/css-image-set-background-type-ref.html" />
<style>
html,
body {
margin: 0;
}
.box {
width: 100px;
height: 100px;
background-image: image-set(
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Crect width='1' height='1' fill='red'/%3E%3C/svg%3E") 1x type("image/not-supported"),
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Crect width='1' height='1' fill='green'/%3E%3C/svg%3E") 1x type("image/svg+xml")
);
background-size: 100% 100%;
}
</style>
<div class="box"></div>