Skip to content

Fix WPT version of scroll-timeilne-snapshotting test#58909

Open
chromium-wpt-export-bot wants to merge 1 commit intomasterfrom
chromium-export-cl-7718838
Open

Fix WPT version of scroll-timeilne-snapshotting test#58909
chromium-wpt-export-bot wants to merge 1 commit intomasterfrom
chromium-export-cl-7718838

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Apr 1, 2026

The original test has implicit timing assumptions about when
events would be dispatched relative to animation frame timing. This
test was also failing on webkit, which supports SDA.

The updated test, has fewer moving parts (pun intended) and works with
or without the snapshot post layout experiment.

Fixing as part of Interop 2026

Bug: 384523570
Change-Id: I84c223d7ca8e8aa1c238bd5b099f94a8712c33aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7718838
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1609258}

The original test has implicit timing assumptions about when
events would be dispatched relative to animation frame timing. This
test was also failing on webkit, which supports SDA.

The updated test, has fewer moving parts (pun intended) and works with
or without the snapshot post layout experiment.

Fixing as part of Interop 2026

Bug: 384523570
Change-Id: I84c223d7ca8e8aa1c238bd5b099f94a8712c33aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7718838
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1609258}
Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

Comment on lines +53 to +55
await runAndWaitForFrameUpdate(() => {
timeline = new ScrollTimeline({source: scroller});
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ought to fix the timeout, but we shouldn't modify this PR:

Suggested change
await runAndWaitForFrameUpdate(() => {
timeline = new ScrollTimeline({source: scroller});
});
await runAndWaitForFrameUpdate(t.step_func(() => {
timeline = new ScrollTimeline({source: scroller});
}));

@foolip
Copy link
Copy Markdown
Member

foolip commented Apr 8, 2026

With these changes Chrome and Firefox pass the test, but Firefox is a timeout instead of failing fast:
https://staging.wpt.fyi/results/scroll-animations/scroll-timelines/scroll-timeline-snapshotting.html?diff&filter=ADC&run_id=5183547490959360&run_id=6047047343931392

@kevers-google I've commented where I think the issue is. setup({ single_test: true }) could also be used to avoid the t.step_func wrapping, it would probably work if you combine it with <script type="module">.

Can you pick a fix you like in a follow-up Chromium CL or WPT PR?

@kevers-google
Copy link
Copy Markdown
Contributor

kevers-google commented Apr 9, 2026

A strategy adopted in later tests is to start with something like:

assert_implements(CSS.supports('animation-timeline:--foo');

or include a CSS rule like

 /* Ensure stable expectations if feature is not supported */
@supports not (animation-timeline:--foo) {
   #element { animation-play-state: paused; 
}

at the start of the test, to ensure a deterministic failure path when the feature is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants