Closed Bug 1841721 Opened 10 months ago Closed 10 months ago

Make /css/css-scroll-snap/input/keyboard.html less flaky

Categories

(Core :: Layout: Scrolling and Overflow, task, P3)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Each test cases in keyboard.html involves async scrolling, and to make sure the async scrolling ends each test ends up using this waitForScrololTo function which checks the current scroll position is the expected one in every scroll event and if it's the expected one, the returned Promise is resolved. Thus if one of the tests fails the check, the tests times out, then any subsequent tests will never be run.

Also, the check is not actually the end of the async scrolling, if an intermediate scroll position is the expected one, the check gets passed.

Anyways, I am going to rewrite it in a more reasonable/less flaky way without using scrollend event. Once after Safari implemented scrollend event we should rewrite the function with using scrollend event.

Now it basically does wait for a state where there are 15 consecutive frames
without any scroll events on the given target.

Blocks: 1768701
Blocks: 1743498

With D182753 there are still two test failures. One is this test case. The other is this.

I am almost 100% sure the former case is invalid. The test expects that a valid snap position on an intended direction scroll operation should be chosen prior to valid snap position on a snap area covering over the snapport. As far as I can tell the spec doesn't define the behavior. Moreover in the description for scroll-stop property;

When scrolling with an intended direction, the scroll container can “pass over” several possible snap positions (that would be valid to snap to, if the scrolling operation used the same direction but a lesser distance)

So UAs can choose any valid snap position on the snap are covering the snapport rather than a valid snap point on a lesser distance.

The latter case expects that an intended direction scroll operation with proximity can scroll to a position where there's no valid snap point. This looks to me it depends on the threshold of the proximity and the scroll distance of each key press. It may be fixed by bug 1766386?

Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fdcac5f186cb
Rewrite waitForScrollEnd to be less flaky. r=botond
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40896 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1697384
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: