Truly independent web browser
Tests: Keep another wheel latch test's steps in one gesture
Andreas Klinge9055fb70278
diff --git a/Tests/LibWeb/Text/expected/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.txt b/Tests/LibWeb/Text/expected/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.txtindex fd17541c7d9..a8e3515c518 100644--- a/Tests/LibWeb/Text/expected/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.txt+++ b/Tests/LibWeb/Text/expected/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.txt@@ -1,4 +1,4 @@-scroller.scrollTop after the first tick: 100+scroller.scrollTop after the first step: 100scroller removed: true-window.scrollY after the second tick: 0-window.scrollY after the third tick: 100+window.scrollY after the second step: 0+window.scrollY after the third step: 100diff --git a/Tests/LibWeb/Text/input/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.html b/Tests/LibWeb/Text/input/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.htmlindex 18f684cdbe2..356336cf34b 100644--- a/Tests/LibWeb/Text/input/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.html+++ b/Tests/LibWeb/Text/input/wheel-latch-drops-when-latched-scroller-is-removed-by-listener.html@@ -28,17 +28,19 @@await animationFrame();await animationFrame();- await internals.wheel(50, 50, 0, 100);- println(`scroller.scrollTop after the first tick: ${scroller.scrollTop}`);+ // NB: These steps belong to one gesture for as long as its fingers rest, however long the test takes to reach the+ // next one. Wheel ticks with no phase stop belonging to it once enough time has passed between them.+ await internals.wheel(50, 50, 0, 100, true, "ongoing");+ println(`scroller.scrollTop after the first step: ${scroller.scrollTop}`);- // The page let the gesture through, so the compositor scrolls the latched scroller by this tick before the+ // The page let the gesture through, so the compositor scrolls the latched scroller by this step before the// listener removes the scroller.- await internals.wheel(50, 50, 0, 100);+ await internals.wheel(50, 50, 0, 100, true, "ongoing");println(`scroller removed: ${!scroller.isConnected}`);- println(`window.scrollY after the second tick: ${window.scrollY}`);+ println(`window.scrollY after the second step: ${window.scrollY}`);- // The scroller the gesture is latched to is gone, so the tick is routed afresh, to the page.- await internals.wheel(50, 50, 0, 100);- println(`window.scrollY after the third tick: ${window.scrollY}`);+ // The scroller the gesture is latched to is gone, so the step is routed afresh, to the page.+ await internals.wheel(50, 50, 0, 100, true, "ongoing");+ println(`window.scrollY after the third step: ${window.scrollY}`);});</script>