Truly independent web browser
Tests: Keep a wheel latch test's steps in one gesture regardless of time
Andreas Klingc4dbf25dd6c1
diff --git a/Tests/LibWeb/Text/expected/wheel-latch-drops-on-prevent-default.txt b/Tests/LibWeb/Text/expected/wheel-latch-drops-on-prevent-default.txtindex 33767c9f771..3d831f16cc8 100644--- a/Tests/LibWeb/Text/expected/wheel-latch-drops-on-prevent-default.txt+++ b/Tests/LibWeb/Text/expected/wheel-latch-drops-on-prevent-default.txt@@ -1,4 +1,4 @@-scroller.scrollTop after the cancelled tick: 0-scroller.scrollTop after the tick following the cancelled one: 100-window.scrollY after the last tick: 0+scroller.scrollTop after the cancelled step: 0+scroller.scrollTop after the step following the cancelled one: 100+window.scrollY after the last step: 0cancelable: true,true,falsediff --git a/Tests/LibWeb/Text/input/wheel-latch-drops-on-prevent-default.html b/Tests/LibWeb/Text/input/wheel-latch-drops-on-prevent-default.htmlindex b87b21ee179..1b29682a641 100644--- a/Tests/LibWeb/Text/input/wheel-latch-drops-on-prevent-default.html+++ b/Tests/LibWeb/Text/input/wheel-latch-drops-on-prevent-default.html@@ -26,17 +26,19 @@await animationFrame();await animationFrame();- await internals.wheel(50, 50, 0, 100);- println(`scroller.scrollTop after the cancelled 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 cancelled step: ${scroller.scrollTop}`);- // The cancelled event ended the gesture the scroller was latched for, so the page sees this tick first again,+ // The cancelled event ended the gesture the scroller was latched for, so the page sees this step first again,// and it is routed afresh.- await internals.wheel(50, 50, 0, 100);- println(`scroller.scrollTop after the tick following the cancelled one: ${scroller.scrollTop}`);+ await internals.wheel(50, 50, 0, 100, true, "ongoing");+ println(`scroller.scrollTop after the step following the cancelled one: ${scroller.scrollTop}`);- // The page let the gesture through, so this tick does not wait for it, and the scroller at its extent keeps it.- await internals.wheel(50, 50, 0, 100);- println(`window.scrollY after the last tick: ${window.scrollY}`);+ // The page let the gesture through, so this step does not wait for it, and the scroller at its extent keeps it.+ await internals.wheel(50, 50, 0, 100, true, "ongoing");+ println(`window.scrollY after the last step: ${window.scrollY}`);println(`cancelable: ${cancelable.join(",")}`);});</script>