Skip to content

Commit a0efcae

Browse files
vmpstrchromium-wpt-export-bot
authored andcommitted
VT: Deflake nothing captured view transition test.
Instead of relying on a double rAF, use waitForCompositorReady in an attempt to deflake the test. Also update the takeScreenshot condition to await the ready promise instead of a double raf. R=kevers@chromium.org Bug: 378536381, 378637954 Change-Id: Icc54a556d7b26d9d74bb9b7fd39a25aef6adccd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6041322 Commit-Queue: Vladimir Levin <vmpstr@chromium.org> Reviewed-by: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#1386391}
1 parent f3dcc20 commit a0efcae

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

css/css-view-transitions/nothing-captured.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<link rel="author" href="mailto:vmpstr@chromium.org">
66
<link rel="match" href="nothing-captured-ref.html">
77
<script src="/common/reftest-wait.js"></script>
8+
<script src="/dom/events/scrolling/scroll_support.js"></script>
89
<style>
910
:root { view-transition-name: none; }
1011
.target {
@@ -39,9 +40,14 @@
3940
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
4041

4142
async function runTest() {
42-
document.startViewTransition(() =>
43-
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));
43+
await document.startViewTransition().ready;
44+
requestAnimationFrame(takeScreenshot);
4445
}
45-
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
46+
47+
onload = async () => {
48+
await waitForCompositorReady();
49+
runTest();
50+
}
51+
4652
</script>
4753

0 commit comments

Comments
 (0)