Skip to content

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

Open
chromium-wpt-export-bot wants to merge 2 commits intomasterfrom
chromium-export-cl-7718838
Open

Fix WPT version of scroll-timeilne-snapshotting test#58909
chromium-wpt-export-bot wants to merge 2 commits 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
Change-Id: I189fb26319ed83d7c0d5a6f41c3c7442bd413bff
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.

@kevers-google
Copy link
Copy Markdown
Contributor

Happy to follow up at a separate Chromium CL to avoid a harness failure when tested on a platform that does not support scroll-driven animations.

@jonathan-j-lee
Copy link
Copy Markdown
Contributor

FYI, it's ok to push the fix directly on this PR (e.g., #58613). The change will be propagated to Chromium on the next import.

@kevers-google
Copy link
Copy Markdown
Contributor

Addition assert to fix the Timeout on Firefox added in https://chromium-review.git.corp.google.com/c/chromium/src/+/7789753.

kevers-google and others added 2 commits April 28, 2026 17:03
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}
Avoid a Timeout on Firefox that was triggered by a call to create a
scrollTimeline. Firefox now fails quickly on the assert_implements call.
@jonathan-j-lee jonathan-j-lee force-pushed the chromium-export-cl-7718838 branch from b6e42ec to b17e302 Compare April 28, 2026 21:05
@jonathan-j-lee
Copy link
Copy Markdown
Contributor

@chromium-wpt-export-bot couldn't make a PR for https://crrev.com/c/7789753 because it depends on this PR, so I've pushed the former here.

@jonathan-j-lee jonathan-j-lee requested a review from foolip April 28, 2026 21:08
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.

5 participants