aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html')
-rw-r--r--tests/wpt/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html b/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html
index a26500989ed..a0d33c28e08 100644
--- a/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html
+++ b/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html
@@ -123,6 +123,15 @@ promise_test(async t => {
// makes the scroll timeline stale.
// https://github.com/w3c/csswg-drafts/issues/8694
+ // runAndWaitForFrameUpdate will yield after the requestAnimationFrame callbacks
+ // have been serviced, which is prior to when stale timelines are updated.
+ // https://github.com/w3c/csswg-drafts/issues/12120
+ assert_approx_equals(timeline.currentTime.value, 60, 0.1);
+
+ // Now wait another beat such that the rest of the HTML Processing Model event loop
+ // has run and we can check whether stale timelines have been updated.
+ await new Promise(setTimeout);
+
// With a single layout, timeline current time would be at 60%, but the
// timeline would be stale.
const expected_progress = 60 * maxScroll / (maxScroll + 1000);