Skip to content

Commit d801f8f

Browse files
tkent-googlemoz-wptsync-bot
authored andcommitted
Bug 1924012 [wpt PR 48575] - css-shapes: Fix flakiness of shape-image-029.html, a=testonly
Automatic update from web-platform-tests css-shapes: Fix flakiness of shape-image-029.html Wait until 'support/left-half-rectangle.png' loaded. Bug: 372252514, 372756068 Change-Id: I106ab5e4de34be91f4365129011aec58f19c936a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5923354 Reviewed-by: Morten Stenshorne <[email protected]> Auto-Submit: Kent Tamura <[email protected]> Commit-Queue: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1367293} -- wpt-commits: 4630a18e4df986614b1a68b277e70caba40dd66b wpt-pr: 48575
1 parent 17ce7c1 commit d801f8f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-029.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!DOCTYPE html>
2+
<html class="reftest-wait">
23
<link rel="help" href="https://drafts.csswg.org/css-shapes-2/#shapes-from-image"/>
34
<link rel="help" href="https://drafts.csswg.org/css-shapes-2/#shape-outside-property"/>
45
<meta name="flags" content="ahem"/>
@@ -42,3 +43,20 @@
4243
XXXXXX
4344
XXXXXX
4445
</div>
46+
47+
<script>
48+
// A workaround of an issue of Chromium content_shell. It finishes a test
49+
// without waiting images linked from url(). crbug.com/372756068
50+
const image = new Image();
51+
image.src = 'support/left-half-rectangle.png';
52+
image.addEventListener('load', () => {
53+
image.remove();
54+
requestAnimationFrame(() => {
55+
requestAnimationFrame(() => {
56+
document.documentElement.classList.remove('reftest-wait');
57+
});
58+
});
59+
});
60+
document.body.appendChild(image);
61+
</script>
62+
</html>

0 commit comments

Comments
 (0)