Skip to content

Commit c16dd5c

Browse files
committed
Tests: Fix test flakiness for mask-image-with-scroll-offset
1 parent 8f15e68 commit c16dd5c

File tree

3 files changed

+33
-21
lines changed

3 files changed

+33
-21
lines changed
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<style>
2-
* {
3-
margin: 0;
4-
scrollbar-width: none;
5-
}
6-
body {
7-
background-color: white;
8-
}
2+
* {
3+
margin: 0;
4+
scrollbar-width: none;
5+
}
6+
body {
7+
background-color: white;
8+
}
99
</style>
10-
<img src="../images/mask-image-with-scroll-offset-ref.png">
10+
<img src="../images/mask-image-with-scroll-offset-ref.png" />
11+
<img src="../data/whf.svg" />
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!DOCTYPE html>
2-
<head>
3-
<link rel="match" href="../expected/mask-image-with-scroll-offset-ref.html" />
2+
<link rel="match" href="../expected/mask-image-with-scroll-offset-ref.html" />
43
<style>
54
* {
65
scrollbar-width: none;
@@ -10,20 +9,18 @@
109
}
1110
#mask-image-box {
1211
background-color: black;
13-
mask-image: url("data:image/svg+xml;,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20250%20100%22%20xmlns:bx=%22https://boxy-svg.com%22%20width=%22250px%22%20height=%22100px%22%3E%3Cdefs/%3E%3Cpath%20style=%22paint-order:%20fill;%20stroke-width:%207px;%20stroke:%20rgb(0,%200,%200);%20fill:%20none;%22%20d=%22M%2012.081%2016.735%20C%2012.452%2024.431%2012.257%2032.16%2012.257%2039.864%20C%2012.257%2045.194%2012.257%2050.524%2012.257%2055.854%20C%2012.257%2058.991%2012.163%2062.157%2012.54%2065.28%20C%2012.819%2067.597%2013.408%2069.752%2014.658%2071.713%20C%2020.129%2080.295%2019.491%2080.452%2026.539%2072.084%20C%2028.049%2070.292%2029.372%2068.575%2030.648%2066.62%20C%2031.224%2065.738%2033.945%2060.514%2035.196%2060.388%20C%2040.978%2059.801%2041.188%2077.229%2047.317%2076.494%20C%2051.976%2075.936%2057.851%2065.369%2060.07%2062.252%20C%2071.941%2045.581%2077.42%2027.247%2084.474%208.554%22/%3E%3Cpath%20style=%22stroke:%20rgb(0,%200,%200);%20stroke-width:%207px;%20fill:%20none;%22%20d=%22M%20114.39%2054.973%20C%20128.428%2054.973%20142.466%2054.973%20156.503%2054.973%22/%3E%3Cpath%20style=%22stroke:%20rgb(0,%200,%200);%20stroke-width:%207px;%20paint-order:%20fill;%20fill:%20none;%22%20d=%22M%20192.852%2086.865%20C%20192.852%2069.251%20193.133%2051.863%20191.594%2034.418%20C%20191.185%2029.777%20187.376%2017.14%20189.886%2012.418%20C%20190.342%2011.561%20198.042%2012.292%20198.919%2012.292%20C%20208.296%2012.292%20218.05%2012.743%20227.261%2012.743%22/%3E%3Cpath%20style=%22stroke:%20rgb(0,%200,%200);%20stroke-width:%207px;%20fill:%20none;%22%20d=%22M%20194.468%2052.122%20C%20202.778%2052.122%20211.087%2052.122%20219.397%2052.122%22/%3E%3Cpath%20style=%22stroke:%20rgb(0,%200,%200);%20stroke-width:%208px;%20fill:%20none;%22%20d=%22M%20112.97%2024.534%20C%20112.97%2039.5%20112.755%2054.483%20113.301%2069.43%20C%20113.497%2074.787%20112.519%2081.541%20113.904%2086.759%22/%3E%3Cpath%20style=%22stroke:%20rgb(0,%200,%200);%20stroke-width:%208px;%20fill:%20none;%22%20d=%22M%20156.251%2026.521%20C%20156.251%2035.293%20155.519%2044.382%20156.337%2053.117%20C%20156.872%2058.831%20158.395%2064.516%20158.467%2070.256%20C%20158.552%2076.979%20156.876%2083.994%20156.876%2090.342%22/%3E%3C/svg%3E");
12+
mask-image: url("../data/whf.svg");
1413
width: 250px;
1514
height: 100px;
1615
position: absolute;
1716
top: 60px;
1817
}
1918
</style>
20-
</head>
21-
<body>
22-
<div id="mask-image-box">
23-
</div>
24-
<script>
25-
setTimeout(() => {
26-
window.scrollTo(0, 50);
27-
}, 0);
28-
</script>
29-
</body>
19+
<div id="mask-image-box"></div>
20+
<script>
21+
setTimeout(() => {
22+
window.scrollTo(0, 50);
23+
}, 0);
24+
</script>
25+
<!-- FIXME: Workaround to ensure CSS background-image is loaded before taking screenshot: https://github.com/LadybirdBrowser/ladybird/issues/3448 -->
26+
<img src="../data/whf.svg" />

0 commit comments

Comments
 (0)