github web-platform-tests/wpt merge_pr_48163

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
12 months ago

[blink] Fix smooth-scroll-in-load-event.html.

The test fails with this error on most platforms:

[FAIL] Smooth scroll in load event handler
assert_equals: Final value of scrollLeft expected 800 but got 0

This is because observeScrolling() completes after 20 rAF without
change to the scroll position, which is not enough for the scroll
animation to start on most platforms. This CL fixes the test by
replacing observeScrolling() with a function that waits for the
"scrollend" event.

This CL also moves the function to wait to a "scrollend" event from
css/css-scroll-snap/support/common.js to
dom/events/scrolling/scroll_support.js for better reusability, and
renames it to waitForScrollEndFallbackToDelayWithoutScrollEvent() to
convey that it has a different behavior when the "scrollend" event is
not available.

Fixed: 327468395
Change-Id: I63d89cd1d0bf0973543aa769765eac00b62ba87c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5823436
Commit-Queue: Francois Pierre Doray fdoray@chromium.org
Reviewed-by: Robert Flack flackr@chromium.org
Cr-Commit-Position: refs/heads/main@{#1355320}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.