wpt
wpt copied to clipboard
Update scrollend tests to avoid using a frame based timeout
Update scrollend tests to avoid using waitFor(), which makes use of a frame based timeout.
Fixes: https://github.com/web-platform-tests/interop/issues/921
Speaking of scrollend events, a bunch of scroll snap tests use it now, even though they aren't about scrollend. That's not great when two browsers don't support scrollend yet.
Speaking of
scrollendevents, a bunch of scroll snap tests use it now, even though they aren't aboutscrollend.
Which tests? Anything that is not specifically testing scrollend is supposed to use something like waitForScrollEndFallbackToDelayWithoutScrollEvent, which as the name suggests falls back to the previous method that was being used of waiting for no scroll events for 200ms. I'm happy to review patches and/or centralize this helper function more to ensure that we don't have a reliance on scrollend to test non-scrollend related scrolling features.
That's not great when two browsers don't support
scrollendyet.
Is the compat table at https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollend_event#browser_compatibility wrong? Which browsers don't support it?
Ah, I didn't know that Firefox implemented. WebKit is the laggard.
Files using waitForScrollendEventNoTimeout() include these (possibly more):
css/css-scroll-snap/scroll-snap-nested-snap-area-layout-changed.tentative.html
css/css-scroll-snap/smooth-anchor-scroll-in-snap-container.html
css/css-scroll-snap/snap-fling-in-large-area.html
css/css-scroll-snap/unrelated-gesture-scroll-during-snap.html
and many more use runLayoutSnapSeletionVerificationTest which relies on scrollend.
@dlrobertson it looks like this PR is blocked on intermittent failures. Do you know if that's a regression from this patch, or if these tests were already intermittent?
@dlrobertson it looks like this PR is blocked on intermittent failures. Do you know if that's a regression from this patch, or if these tests were already intermittent?
I had a look at this. The patch is changing 2 scrollend tests, and making a backwards-compatible change to a shared utility function (adding a new optional parameter and preserving behaviour if the parameter is not passed). Therefore, it should not affect any other tests than the 2 changed ones.
The intermittent failures seen in the CI jobs of this push are all failures of different tests, and spot checking a few of them, they are already known to be intermittent (e.g. this one).
==> I believe these are unrelated, pre-existing intermittent failures.