Title: [285430] trunk/LayoutTests
Revision
285430
Author
[email protected]
Date
2021-11-08 13:52:43 -0800 (Mon, 08 Nov 2021)

Log Message

Convert some tests that use eventSender.eventSender.mouseScrollByWithWheelAndMomentumPhases() to sendEventStream()
https://bugs.webkit.org/show_bug.cgi?id=232820

Reviewed by Wenson Hsieh.

These tests were using repeated calls to
eventSender.mouseScrollByWithWheelAndMomentumPhases() to dispatch wheel events, including
events in the momentum phase. Convert them to UIScriptController.sendEventStream() via a
UIHelper function.

Move fast/scrolling/momentum-scroll-with-borders.html to the mac directory.

* fast/scrolling/mac/momentum-event-sequence.html:
* fast/scrolling/mac/momentum-scroll-with-borders-expected.txt: Renamed from LayoutTests/fast/scrolling/momentum-scroll-with-borders-expected.txt.
* fast/scrolling/mac/momentum-scroll-with-borders.html: Added.
* fast/scrolling/momentum-scroll-with-borders.html: Removed.
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/win/TestExpectations:
* platform/wpe/TestExpectations:
* scrollingcoordinator/mac/multiple-fixed.html:
* scrollingcoordinator/mac/nested-sticky-expected.html:
* scrollingcoordinator/mac/nested-sticky.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html:
* tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
* tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
* tiled-drawing/scrolling/iframe_in_iframe.html:
* tiled-drawing/scrolling/latched-div-with-scroll-snap.html:
* tiled-drawing/scrolling/latched-to-deleted-node.html:
* tiled-drawing/scrolling/overflow-scroll-reduced-content.html:
* tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html:
* tiled-drawing/scrolling/root-overflow-with-mousewheel.html:
* tiled-drawing/scrolling/scroll-iframe-latched-selects.html:
* tiled-drawing/scrolling/scrolling-no-iframe-latching.html:
* tiled-drawing/scrolling/wheel-events-with-no-delta.html:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (285429 => 285430)


--- trunk/LayoutTests/ChangeLog	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/ChangeLog	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,3 +1,52 @@
+2021-11-08  Simon Fraser  <[email protected]>
+
+        Convert some tests that use eventSender.eventSender.mouseScrollByWithWheelAndMomentumPhases() to sendEventStream()
+        https://bugs.webkit.org/show_bug.cgi?id=232820
+
+        Reviewed by Wenson Hsieh.
+        
+        These tests were using repeated calls to
+        eventSender.mouseScrollByWithWheelAndMomentumPhases() to dispatch wheel events, including
+        events in the momentum phase. Convert them to UIScriptController.sendEventStream() via a
+        UIHelper function.
+        
+        Move fast/scrolling/momentum-scroll-with-borders.html to the mac directory.
+
+        * fast/scrolling/mac/momentum-event-sequence.html:
+        * fast/scrolling/mac/momentum-scroll-with-borders-expected.txt: Renamed from LayoutTests/fast/scrolling/momentum-scroll-with-borders-expected.txt.
+        * fast/scrolling/mac/momentum-scroll-with-borders.html: Added.
+        * fast/scrolling/momentum-scroll-with-borders.html: Removed.
+        * platform/gtk/TestExpectations:
+        * platform/ios/TestExpectations:
+        * platform/win/TestExpectations:
+        * platform/wpe/TestExpectations:
+        * scrollingcoordinator/mac/multiple-fixed.html:
+        * scrollingcoordinator/mac/nested-sticky-expected.html:
+        * scrollingcoordinator/mac/nested-sticky.html:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html:
+        * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html:
+        * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
+        * tiled-drawing/scrolling/iframe_in_iframe.html:
+        * tiled-drawing/scrolling/latched-div-with-scroll-snap.html:
+        * tiled-drawing/scrolling/latched-to-deleted-node.html:
+        * tiled-drawing/scrolling/overflow-scroll-reduced-content.html:
+        * tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html:
+        * tiled-drawing/scrolling/root-overflow-with-mousewheel.html:
+        * tiled-drawing/scrolling/scroll-iframe-latched-selects.html:
+        * tiled-drawing/scrolling/scrolling-no-iframe-latching.html:
+        * tiled-drawing/scrolling/wheel-events-with-no-delta.html:
+
 2021-11-08  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r285408.

Modified: trunk/LayoutTests/fast/scrolling/mac/momentum-event-sequence.html (285429 => 285430)


--- trunk/LayoutTests/fast/scrolling/mac/momentum-event-sequence.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/fast/scrolling/mac/momentum-event-sequence.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -17,52 +17,44 @@
             const wheelEventSquence = {
                 "events" : [
                     {
-                        "type" : "wheel",
-                        "viewX" : 100,
-                        "viewY" : 100,
-                        "deltaX" : 0,
-                        "deltaY" : -10, // Note that this delta is currently ignored.
-                        "phase" : "began"
+                        type : "wheel",
+                        viewX : 100,
+                        viewY : 100,
+                        deltaY : -10, // Note that this delta is currently ignored.
+                        phase : "began"
                     },
                     {
-                        "type" : "wheel",
-                        "deltaX" : 0,
-                        "deltaY" : -10,
-                        "phase" : "changed"
+                        type : "wheel",
+                        deltaY : -10,
+                        phase : "changed"
                     },
                     {
-                        "type" : "wheel",
-                        "deltaX" : 0,
-                        "deltaY" : -8,
-                        "phase" : "changed"
+                        type : "wheel",
+                        deltaY : -8,
+                        phase : "changed"
                     },
                     {
-                        "type" : "wheel",
-                        "deltaX" : 0,
-                        "deltaY" : 0,
-                        "phase" : "ended"
+                        type : "wheel",
+                        phase : "ended"
                     },
                     {
-                        "type" : "wheel",
-                        "deltaX" : 0,
-                        "deltaY" : -10,
-                        "momentumPhase" : "began"
+                        type : "wheel",
+                        deltaY : -10,
+                        momentumPhase : "began"
                     },
                     {
-                        "type" : "wheel",
-                        "deltaX" : 0,
-                        "deltaY" : -12,
-                        "momentumPhase" : "changed"
+                        type : "wheel",
+                        deltaY : -12,
+                        momentumPhase : "changed"
                     },
                     {
-                        "type" : "wheel",
-                        "deltaX" : 0,
-                        "deltaY" : -6,
-                        "momentumPhase" : "changed"
+                        type: "wheel",
+                        deltaY: -6,
+                        momentumPhase: "changed"
                     },
                     {
-                        "type" : "wheel",
-                        "momentumPhase" : "ended"
+                        type : "wheel",
+                        momentumPhase : "ended"
                     }
                 ]
             };

Copied: trunk/LayoutTests/fast/scrolling/mac/momentum-scroll-with-borders-expected.txt (from rev 285429, trunk/LayoutTests/fast/scrolling/momentum-scroll-with-borders-expected.txt) (0 => 285430)


--- trunk/LayoutTests/fast/scrolling/mac/momentum-scroll-with-borders-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/momentum-scroll-with-borders-expected.txt	2021-11-08 21:52:43 UTC (rev 285430)
@@ -0,0 +1 @@
+PASS: scrollTop was 700

Added: trunk/LayoutTests/fast/scrolling/mac/momentum-scroll-with-borders.html (0 => 285430)


--- trunk/LayoutTests/fast/scrolling/mac/momentum-scroll-with-borders.html	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/momentum-scroll-with-borders.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        #scrolling {
+            height: 300px;
+            width: 300px;
+            border: 100px solid gray;
+            border-left-width: 0px;
+            border-right-width: 0px;
+            overflow-y: scroll;
+        }
+        
+        .content {
+            height: 1000px;
+            width: 100%;
+            background-image: repeating-linear-gradient(silver, white 200px);
+        }
+    </style>
+    <script src=""
+    <script>
+        function checkForScroll()
+        {
+            var scroller = document.getElementById("scrolling");
+            var expectedScrollTop = 700;
+            
+            if (scroller.scrollTop == expectedScrollTop)
+                document.getElementById('result').textContent = "PASS: scrollTop was " + expectedScrollTop;
+            else
+                document.getElementById('result').textContent = "FAIL: scrollTop was " + scroller.scrollTop;
+
+            testRunner.notifyDone();
+        }
+
+        async function scrollTest()
+        {
+            const events = [
+                {
+                    type : "wheel",
+                    viewX : 100,
+                    viewY : 120,
+                    deltaY : -10,
+                    phase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -10,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -10,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    phase : "ended"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -30,
+                    momentumPhase : "began"
+                }
+            ];
+            
+            const momentumEvent = {
+                type : "wheel",
+                deltaY : -50,
+                momentumPhase : "changed"
+            };
+            
+            const momentumEventCount = 15;
+            const momentumEvents = Array(momentumEventCount).fill(momentumEvent);
+
+            events.push(...momentumEvents);
+
+            const endEvent = {
+                type : "wheel",
+                momentumPhase : "ended"
+            };
+            events.push(endEvent);
+
+            await UIHelper.mouseWheelSequence({ events: events });
+            checkForScroll();
+        }
+
+        function startTest()
+        {
+            if (!window.eventSender) {
+                setTimeout(scrollTest, 0);
+                return;
+            }
+
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+
+            setTimeout(scrollTest, 0);
+        }
+        
+        window.addEventListener('load', startTest, false);
+    </script>
+</head>
+<body>
+<div id="scrolling">
+    <div class="content"></div>
+</div>
+<div id="result"></div>
+</body>
+</html>

Deleted: trunk/LayoutTests/fast/scrolling/momentum-scroll-with-borders-expected.txt (285429 => 285430)


--- trunk/LayoutTests/fast/scrolling/momentum-scroll-with-borders-expected.txt	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/fast/scrolling/momentum-scroll-with-borders-expected.txt	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1 +0,0 @@
-PASS: scrollTop was 700

Deleted: trunk/LayoutTests/fast/scrolling/momentum-scroll-with-borders.html (285429 => 285430)


--- trunk/LayoutTests/fast/scrolling/momentum-scroll-with-borders.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/fast/scrolling/momentum-scroll-with-borders.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,78 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-    <style>
-        #scrolling {
-            height: 300px;
-            width: 300px;
-            border: 100px solid gray;
-            border-left-width: 0px;
-            border-right-width: 0px;
-            overflow-y: scroll;
-        }
-        
-        .content {
-            height: 1000px;
-            width: 100%;
-            background-image: repeating-linear-gradient(silver, white 200px);
-        }
-    </style>
-    <script>
-        function checkForScroll()
-        {
-            var scroller = document.getElementById("scrolling");
-            var expectedScrollTop = 700;
-            
-            if (scroller.scrollTop == expectedScrollTop)
-                document.getElementById('result').textContent = "PASS: scrollTop was " + expectedScrollTop;
-            else
-                document.getElementById('result').textContent = "FAIL: scrollTop was " + scroller.scrollTop;
-
-            testRunner.notifyDone();
-        }
-        
-        function scrollTest()
-        {
-            eventSender.mouseMoveTo(100, 120);
-
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -3, 'none', 'begin');
-            
-            let remainingScrolls = 15;
-            let sendMomentumScroll = function() {
-                eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'none', 'continue');
-                if (!--remainingScrolls) {
-                    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-                    eventSender.callAfterScrollingCompletes(checkForScroll);
-                    return;
-                }
-                requestAnimationFrame(sendMomentumScroll);
-            }
-            requestAnimationFrame(sendMomentumScroll);
-        }
-
-        function startTest()
-        {
-            if (window.eventSender) {
-                testRunner.dumpAsText();
-                testRunner.waitUntilDone();
-
-                eventSender.monitorWheelEvents();
-                setTimeout(scrollTest, 0);
-            }
-        }
-        
-        window.addEventListener('load', startTest, false);
-    </script>
-</head>
-<body>
-<div id="scrolling">
-    <div class="content"></div>
-</div>
-<div id="result"></div>
-</body>
-</html>

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (285429 => 285430)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1365,7 +1365,6 @@
 
 # Timing out due to missing functionality.
 webkit.org/b/212202 webkit.org/b/168189 fast/scrolling/arrow-key-scroll-in-rtl-document.html [ Skip ] # Failure Timeout.
-webkit.org/b/212202 webkit.org/b/197507 fast/scrolling/momentum-scroll-with-borders.html [ Skip ] # Timeout Pass.
 webkit.org/b/212202 webkit.org/b/158917 fast/scrolling/overflow-scroll-past-max.html [ Skip ] # Failure Pass Timeout.
 webkit.org/b/212202 fast/scrolling/programmatic-scroll-to-zero-zero.html [ Skip ]
 webkit.org/b/212202 fast/scrolling/rtl-point-in-iframe.html [ Skip ]

Modified: trunk/LayoutTests/platform/ios/TestExpectations (285429 => 285430)


--- trunk/LayoutTests/platform/ios/TestExpectations	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2021-11-08 21:52:43 UTC (rev 285430)
@@ -700,7 +700,6 @@
 fast/replaced/image-map.html [ Skip ]
 fast/scrolling/arrow-key-scroll-in-rtl-document.html [ Skip ]
 fast/scrolling/overflow-scroll-past-max.html [ Skip ]
-fast/scrolling/momentum-scroll-with-borders.html [ Skip ]
 fast/scrolling/scroll-animator-basic-events.html [ Skip ]
 fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html [ Skip ]
 fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html [ Skip ]

Modified: trunk/LayoutTests/platform/win/TestExpectations (285429 => 285430)


--- trunk/LayoutTests/platform/win/TestExpectations	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/platform/win/TestExpectations	2021-11-08 21:52:43 UTC (rev 285430)
@@ -4388,7 +4388,6 @@
 
 webkit.org/b/202953 http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-https-with-embedded-http-with-embedded-https.https.html [ Timeout ]
 
-webkit.org/b/204153 fast/scrolling/momentum-scroll-with-borders.html [ Failure Timeout ]
 webkit.org/b/204153 fast/scrolling/overflow-scroll-past-max.html [ Failure Timeout ]
 webkit.org/b/204153 http/tests/navigation/page-cache-mediakeysession.html [ Failure ]
 webkit.org/b/204153 http/tests/xmlhttprequest/access-control-and-redirects-async.html [ Failure ]

Modified: trunk/LayoutTests/platform/wpe/TestExpectations (285429 => 285430)


--- trunk/LayoutTests/platform/wpe/TestExpectations	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2021-11-08 21:52:43 UTC (rev 285430)
@@ -915,7 +915,6 @@
 
 webkit.org/b/212202 fast/scrolling/arrow-key-scroll-in-rtl-document.html [ Timeout ]
 webkit.org/b/212202 fast/scrolling/iframe-scrollable-after-back.html [ Timeout ]
-webkit.org/b/212202 fast/scrolling/momentum-scroll-with-borders.html [ Timeout ]
 webkit.org/b/212202 fast/scrolling/overflow-scroll-past-max.html [ Timeout ]
 webkit.org/b/212202 fast/scrolling/programmatic-scroll-to-zero-zero.html [ Timeout ]
 webkit.org/b/212202 fast/scrolling/rtl-point-in-iframe.html [ Timeout ]

Modified: trunk/LayoutTests/scrollingcoordinator/mac/multiple-fixed.html (285429 => 285430)


--- trunk/LayoutTests/scrollingcoordinator/mac/multiple-fixed.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/scrollingcoordinator/mac/multiple-fixed.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -19,18 +19,45 @@
             bottom: 0;
         }
     </style>
+    <script src=""
     <script>
-        function scrollTest()
+        async function scrollTest()
         {
-            eventSender.mouseMoveTo(20, 20);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "began", "none");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "changed", "none");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "continue");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "continue");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end");
-            eventSender.callAfterScrollingCompletes(() => {
-                testRunner.notifyDone();
-            });
+            const events = [
+                {
+                    type : "wheel",
+                    viewX : 20,
+                    viewY : 20,
+                    deltaY : -10,
+                    phase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -1000,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    phase : "ended"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -1000,
+                    momentumPhase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -1000,
+                    momentumPhase : "changed"
+                },
+                {
+                    type : "wheel",
+                    momentumPhase : "ended"
+                }
+            ];
+
+            await UIHelper.mouseWheelSequence({ events: events });
+            testRunner.notifyDone();
         }
 
         function startTest()
@@ -37,8 +64,6 @@
         {
             if (window.eventSender) {
                 testRunner.waitUntilDone();
-
-                eventSender.monitorWheelEvents();
                 setTimeout(scrollTest, 0);
             }
         }

Modified: trunk/LayoutTests/scrollingcoordinator/mac/nested-sticky-expected.html (285429 => 285430)


--- trunk/LayoutTests/scrollingcoordinator/mac/nested-sticky-expected.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/scrollingcoordinator/mac/nested-sticky-expected.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -15,7 +15,6 @@
 
         .sticky {
             position: sticky;
-            position: -webkit-sticky;
             top: 0px;
         }
 

Modified: trunk/LayoutTests/scrollingcoordinator/mac/nested-sticky.html (285429 => 285430)


--- trunk/LayoutTests/scrollingcoordinator/mac/nested-sticky.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/scrollingcoordinator/mac/nested-sticky.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -26,18 +26,45 @@
             height: 80px;
         }
     </style>
+    <script src=""
     <script>
-        function scrollTest()
+        async function scrollTest()
         {
-            eventSender.mouseMoveTo(20, 20);
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "began", "none");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "changed", "none");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "continue");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "continue");
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end");
-            eventSender.callAfterScrollingCompletes(() => {
-                testRunner.notifyDone();
-            });
+            const events = [
+                {
+                    type : "wheel",
+                    viewX : 20,
+                    viewY : 20,
+                    deltaY : -10,
+                    phase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -1000,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    phase : "ended"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -1000,
+                    momentumPhase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaY : -1000,
+                    momentumPhase : "changed"
+                },
+                {
+                    type : "wheel",
+                    momentumPhase : "ended"
+                }
+            ];
+
+            await UIHelper.mouseWheelSequence({ events: events });
+            testRunner.notifyDone();
         }
 
         function startTest()
@@ -44,8 +71,6 @@
         {
             if (window.eventSender) {
                 testRunner.waitUntilDone();
-
-                eventSender.monitorWheelEvents();
                 setTimeout(scrollTest, 0);
             }
         }

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -13,6 +13,7 @@
 }
 </style>
 <script src=""
+<script src=""
 <script>
     window.jsTestIsAsync = true;
 
@@ -46,7 +47,7 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -56,23 +57,54 @@
         divScrollPositionBefore = divTarget.scrollTop;
 
         // Scroll the #source until we reach the #target.
-        var startPosX = Math.round(divTarget.offsetLeft) + 20;
-        var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
-        eventSender.mouseMoveTo(startPosX, startPosY);
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(checkForScroll);
+        const startPosX = Math.round(divTarget.offsetLeft) + 20;
+        const startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
+
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
     }
 
     function setupTopLevel()
     {
         if (window.eventSender) {
-            eventSender.monitorWheelEvents();
             setTimeout(scrollTest, 0);
         } else {
             var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -13,6 +13,7 @@
 }
 </style>
 <script src=""
+<script src=""
 <script>
     window.jsTestIsAsync = true;
 
@@ -40,7 +41,7 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -50,23 +51,54 @@
         divScrollPositionBefore = divTarget.scrollTop;
 
         // Scroll the #source until we reach the #target.
-        var startPosX = Math.round(divTarget.offsetLeft) + 20;
-        var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
-        eventSender.mouseMoveTo(startPosX, startPosY);
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(checkForScroll);
+        const startPosX = Math.round(divTarget.offsetLeft) + 20;
+        const startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
+
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
     }
 
     function setupTopLevel()
     {
         if (window.eventSender) {
-            eventSender.monitorWheelEvents();
             setTimeout(scrollTest, 0);
         } else {
             var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -13,6 +13,7 @@
 }
 </style>
 <script src=""
+<script src=""
 <script>
     window.jsTestIsAsync = true;
 
@@ -57,7 +58,7 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -66,20 +67,51 @@
         divScrollPositionBefore = divTarget.scrollTop;
 
         // Scroll the #source until we reach the #target.
-        var startPosX = Math.round(divTarget.offsetLeft) + 20;
-        var startPosY = Math.round(divTarget.offsetTop) - 42;
-        eventSender.mouseMoveTo(startPosX, startPosY);
+        const startPosX = Math.round(divTarget.offsetLeft) + 20;
+        const startPosY = Math.round(divTarget.offsetTop) - 42;
+
         debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(() => {
-            requestAnimationFrame(checkForScroll);
-        });
+
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -40,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
         // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     }
 
@@ -88,8 +120,6 @@
         if (window.eventSender) {
             testRunner.dumpAsText();
             testRunner.waitUntilDone();
-
-            eventSender.monitorWheelEvents();
             setTimeout(scrollTest, 0);
         } else {
             var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -13,6 +13,7 @@
 }
 </style>
 <script src=""
+<script src=""
 <script>
     window.jsTestIsAsync = true;
 
@@ -46,7 +47,7 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -55,17 +56,49 @@
         divScrollPositionBefore = divTarget.scrollTop;
 
         // Scroll the #source until we reach the #target.
-        var startPosX = Math.round(divTarget.offsetLeft) + 20;
-        var startPosY = Math.round(divTarget.offsetTop) - 42;
-        eventSender.mouseMoveTo(startPosX, startPosY);
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(checkForScroll);
+        const startPosX = Math.round(divTarget.offsetLeft) + 20;
+        const startPosY = Math.round(divTarget.offsetTop) - 42;
+
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -40,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
         // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     }
 
@@ -74,11 +107,7 @@
         if (window.eventSender) {
             testRunner.dumpAsText();
             testRunner.waitUntilDone();
-
-            eventSender.monitorWheelEvents();
-            requestIdleCallback(() => {
-                setTimeout(scrollTest, 0);
-            });
+            setTimeout(scrollTest, 0);
         } else {
             var messageLocation = document.getElementById('parent');
             var message = document.createElement('div');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
-<link rel="help" href=""
 <script src=""
+<script src=""
 <script>
     window.jsTestIsAsync = true;
 
@@ -36,7 +36,7 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -48,23 +48,54 @@
         iFrameScrollPositionBefore = iframeBody.scrollTop;
 
         // Scroll the #source until we reach the #target.
-        var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
-        var startPosY = Math.round(iframeTarget.offsetTop) + 100;
-        eventSender.mouseMoveTo(startPosX, startPosY);
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(checkForScroll);
+        const startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+        const startPosY = Math.round(iframeTarget.offsetTop) + 100;
+
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
     }
 
     function setupTopLevel()
     {
         if (window.eventSender) {
-            eventSender.monitorWheelEvents();
             setTimeout(scrollTest, 0);
         } else {
             var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
-<link rel="help" href=""
 <script src=""
+<script src=""
 <script>
     window.jsTestIsAsync = true;
     
@@ -30,7 +30,7 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -42,23 +42,54 @@
         iFrameScrollPositionBefore = iFrameBody.scrollTop;
 
         // Scroll the #source until we reach the #target.
-        var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
-        var startPosY = Math.round(iframeTarget.offsetTop) + 100;
-        eventSender.mouseMoveTo(startPosX, startPosY);
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(checkForScroll);
+        const startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+        const startPosY = Math.round(iframeTarget.offsetTop) + 100;
+
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
     }
 
     function setupTopLevel()
     {
         if (window.eventSender) {
-            eventSender.monitorWheelEvents();
             setTimeout(scrollTest, 0);
         } else {
             var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
-<link rel="help" href=""
 <script src=""
+<script src=""
 <script>
 var wheelCount = 0;
 function onScrollWheel(evt) {
@@ -48,7 +48,7 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBefore = document.scrollingElement.scrollTop;
     iFrameScrollPositionBefore = window.frames['target'].document.scrollingElement.scrollTop;
@@ -56,19 +56,49 @@
     iframeTarget = document.getElementById('target');
 
     // Scroll the #source until we reach the #target.
-    var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
-    var startPosY = Math.round(iframeTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the IFrame
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    //debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+    const startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+    const startPosY = Math.round(iframeTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the IFrame
 
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -40,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
 }
 
@@ -77,8 +107,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
-<link rel="help" href=""
 <script src=""
+<script src=""
 </head>
 <body _onload_="onLoad();">
 <script>
@@ -42,7 +42,7 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBefore = document.scrollingElement.scrollTop;
     iFrameScrollPositionBefore = window.frames['target'].document.scrollingElement.scrollTop;
@@ -50,18 +50,49 @@
     iframeTarget = document.getElementById('target');
 
     // Scroll the #source until we reach the #target.
-    var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
-    var startPosY = Math.round(iframeTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the IFrame
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+    const startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+    const startPosY = Math.round(iframeTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the IFrame
 
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -40,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
 }
 
@@ -70,8 +101,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
-<link rel="help" href=""
 <script src=""
+<script src=""
 </head>
 <body _onload_="setupTopLevel();">
 <script>
@@ -37,7 +37,7 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBefore = document.scrollingElement.scrollTop;
     iFrameScrollPositionBefore = window.frames['target'].document.scrollingElement.scrollTop;
@@ -48,18 +48,49 @@
     selectTargetScrollPositionBefore = selectTarget.scrollTop;
 
     // Scroll the #source until we reach the #target.
-    var startPosX = Math.round(selectTarget.offsetLeft) + 10;
-    var startPosY = Math.round(selectTarget.offsetTop) + 10; // Slightly more than one wheel scroll away from the IFrame
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+    const startPosX = Math.round(selectTarget.offsetLeft) + 10;
+    const startPosY = Math.round(selectTarget.offsetTop) + 10; // Slightly more than one wheel scroll away from the IFrame
 
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
 }
 
@@ -68,8 +99,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,7 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src="" type="text/_javascript_"></script>
+<script src=""
+<script src=""
 <style>
     #parent {
         background-color: #eee;
@@ -46,19 +47,39 @@
             setTimeout(zoomPageOut, 100);
     }
 
-    function scrollDown()
+    async function scrollDown()
     {
         // Scroll the #source until we reach the #target.
-        var selectTarget = document.getElementById('target');
-        var startPosX = Math.round(selectTarget.offsetLeft) + 20;
-        var startPosY = Math.round(selectTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the target div
-        eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the target div
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        for (var i = 0; i < 40; ++i) {
-            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'changed', 'none');
-        }
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-         
+        const selectTarget = document.getElementById('target');
+        const startPosX = Math.round(selectTarget.offsetLeft) + 20;
+        const startPosY = Math.round(selectTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the target div
+
+        let events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            }
+        ];
+
+        const changedEvent = {
+            type : "wheel",
+            deltaY : -100,
+            phase : "changed"
+        };
+
+        const changedEventCount = 40;
+        const changedEvents = Array(changedEventCount).fill(changedEvent);
+        events.push(...changedEvents);
+        events.push({
+            type : "wheel",
+            phase : "ended"
+        });
+
+        await UIHelper.mouseWheelSequence({ events: events });
+
         setTimeout(zoomPageOut, 700);
     }
 

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -16,6 +16,7 @@
 }
 </style>
 <script src=""
+<script src=""
 <script>
     window.jsTestIsAsync = true;
 
@@ -48,7 +49,7 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         selectTarget = document.getElementById('target');
 
@@ -56,18 +57,49 @@
         selectScrollPositionBefore = selectTarget.scrollTop;
 
         // Scroll the #source until we reach the #target.
-        var startPosX = Math.round(selectTarget.offsetLeft) + 20;
-        var startPosY = Math.round(selectTarget.offsetTop) - 42;
-        eventSender.mouseMoveTo(startPosX, startPosY);
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(checkForScroll);
+        const startPosX = Math.round(selectTarget.offsetLeft) + 20;
+        const startPosY = Math.round(selectTarget.offsetTop) - 42;
 
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -40,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
         // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     }
 
@@ -78,8 +110,6 @@
         if (window.eventSender) {
             testRunner.dumpAsText();
             testRunner.waitUntilDone();
-
-            eventSender.monitorWheelEvents();
             setTimeout(scrollTest, 0);
         } else {
             var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -26,6 +26,7 @@
 
 </style>
 <script src=""
+<script src=""
 <script>
 function onLoad() {
     window.addEventListener("scroll", onPageScroll);
@@ -71,7 +72,7 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -80,20 +81,49 @@
     selectScrollPositionBefore = selectTarget.scrollTop;
 
     // Scroll the #source until we reach the #target.
-    var startPosX = Math.round(selectTarget.offsetLeft) + 20;
-    var startPosY = Math.round(selectTarget.offsetTop) - 42;
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(() => {
-        requestAnimationFrame(checkForScroll);
-    });
+    const startPosX = Math.round(selectTarget.offsetLeft) + 20;
+    const startPosY = Math.round(selectTarget.offsetTop) - 42;
 
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -40,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
 }
 

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -26,6 +26,7 @@
 
 </style>
 <script src=""
+<script src=""
 <script>
 var wheelCount = 0;
 function onScrollWheel(evt) {
@@ -65,7 +66,7 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -75,19 +76,53 @@
     selectScrollPositionBefore = selectTarget.scrollTop;
 
     // Scroll the #source until we reach the #target.
-    var startPosX = Math.round(selectTarget.offsetLeft) + 20;
     debug("div display height = " + Math.round(selectTarget.clientHeight));
-    var startPosY = Math.round(selectTarget.offsetTop) + Math.round(selectTarget.clientHeight) - 42;
-    eventSender.mouseMoveTo(startPosX, startPosY);
+
+    const startPosX = Math.round(selectTarget.offsetLeft) + 20;
+    const startPosY = Math.round(selectTarget.offsetTop) + Math.round(selectTarget.clientHeight) - 42;
+
     debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
 }
 
 function setupTopLevel()
@@ -95,8 +130,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -26,6 +26,7 @@
 
 </style>
 <script src=""
+<script src=""
 <script>
 function onLoad() {
     setupTopLevel();
@@ -59,7 +60,7 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -69,19 +70,52 @@
     selectScrollPositionBefore = selectTarget.scrollTop;
 
     // Scroll the #source until we reach the #target.
-    var startPosX = Math.round(selectTarget.offsetLeft) + 20;
+    const startPosX = Math.round(selectTarget.offsetLeft) + 20;
+    const startPosY = Math.round(selectTarget.offsetTop) + Math.round(selectTarget.clientHeight) - 42;
+
     debug("div display height = " + Math.round(selectTarget.clientHeight));
-    var startPosY = Math.round(selectTarget.offsetTop) + Math.round(selectTarget.clientHeight) - 42;
-    eventSender.mouseMoveTo(startPosX, startPosY);
     debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
 }
 
 function setupTopLevel()
@@ -89,8 +123,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/iframe_in_iframe.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/iframe_in_iframe.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/iframe_in_iframe.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -19,6 +19,7 @@
         }
         </style>
         <script src=""
+        <script src=""
     </head>
     <body>
 <script>
@@ -55,7 +56,7 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBefore = document.scrollingElement.scrollTop;
 
@@ -68,17 +69,49 @@
     innerIFrameScrollPositionBefore = innerIFrameTarget.scrollTop;
 
     // Scroll the #source until we reach the #target.
-    var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
-    var startPosY = Math.round(iframeTarget.offsetTop) + 80;
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+    const startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+    const startPosY = Math.round(iframeTarget.offsetTop) + 80;
+
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
 }
 
 function setupTopLevel()
@@ -86,8 +119,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     }
 }

Modified: trunk/LayoutTests/tiled-drawing/scrolling/latched-div-with-scroll-snap.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/latched-div-with-scroll-snap.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/latched-div-with-scroll-snap.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -48,6 +48,7 @@
             #itemH4, #itemV4 { background-color: yellow; }
             #itemH5, #itemV5 { background-color: fuchsia; }
         </style>
+        <script src=""
         <script>
         function locationInWindowCoordinates(element)
         {
@@ -69,30 +70,62 @@
 
         let swipeWithMomentum = (element) => swipeInElement(element, true);
         let swipeWithoutMomentum = (element) => swipeInElement(element, false);
-        function swipeInElement(element, momentum)
+        
+        async function swipeInElement(element, momentum)
         {
-            return new Promise(resolve => {
-                write(`* Swiping ${momentum ? "with" : "without"} momentum in ${element.id} with scroll offset ${element.scrollLeft}`);
-                let location = locationInWindowCoordinates(element);
-                internals.setPlatformMomentumScrollingPredictionEnabled(false);
-                eventSender.monitorWheelEvents();
-                eventSender.mouseMoveTo(location.x, location.y);
-                eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "began", "none");
-                eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "changed", "none");
-                eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "changed", "none");
-                eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
-                if (momentum) {
-                    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "none", "begin");
-                    eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, "none", "continue");
-                    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end");
+            write(`* Swiping ${momentum ? "with" : "without"} momentum in ${element.id} with scroll offset ${element.scrollLeft}`);
+
+            internals.setPlatformMomentumScrollingPredictionEnabled(false);
+            const location = locationInWindowCoordinates(element);
+
+            let events = [
+                {
+                    type : "wheel",
+                    viewX : location.x,
+                    viewY : location.y,
+                    deltaX : -10,
+                    phase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaX : -10,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    deltaX : -10,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    phase : "ended"
                 }
-                eventSender.callAfterScrollingCompletes(() => {
-                    write(`  topTarget now has scroll offset ${topTarget.scrollLeft}`);
-                    write(`  bottomTarget now has scroll offset ${bottomTarget.scrollLeft}`);
-                    write("");
-                    resolve();
-                });
-            });
+            ];
+            const momentumEvents = [
+                {
+                    type : "wheel",
+                    deltaX : -10,
+                    momentumPhase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaX : -10,
+                    momentumPhase : "changed"
+                },
+                {
+                    type : "wheel",
+                    momentumPhase : "ended"
+                }
+            ];
+            
+            if (momentum) 
+                events.push(...momentumEvents);
+
+            await UIHelper.mouseWheelSequence({ events: events });
+
+            write(`  topTarget now has scroll offset ${topTarget.scrollLeft}`);
+            write(`  bottomTarget now has scroll offset ${bottomTarget.scrollLeft}`);
+            write("");
         }
 
         function run()

Modified: trunk/LayoutTests/tiled-drawing/scrolling/latched-to-deleted-node.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/latched-to-deleted-node.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/latched-to-deleted-node.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -39,6 +39,7 @@
 	}
 	</style>
 <script src=""
+<script src=""
 </head>
 <body _onload_="setupTopLevel();">
 <script>
@@ -118,7 +119,7 @@
     finishJSTest();
 }
 
-function scrollTest()
+async function scrollTest()
 {
     pageScrollPositionBeforeGesture = document.scrollingElement.scrollTop;
 
@@ -126,20 +127,50 @@
 
     divScrollPositionBeforeGesture = divElement.getBoundingClientRect().top;
 
-    var windowPosition = locationInWindowCoordinates(divElement);
+    const windowPosition = locationInWindowCoordinates(divElement);
+    const startPosX = windowPosition.x + 0.5 * divElement.clientWidth;
+    const startPosY = windowPosition.y + 0.5 * divElement.clientHeight;
 
-    var startPosX = windowPosition.x + 0.5 * divElement.clientWidth;
-    var startPosY = windowPosition.y + 0.5 * divElement.clientHeight;
-    
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -5, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
 }
 
 function setupTopLevel()
@@ -147,8 +178,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/tiled-drawing/scrolling/overflow-scroll-reduced-content.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/overflow-scroll-reduced-content.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/overflow-scroll-reduced-content.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -26,6 +26,7 @@
 </style>
 
 <script src=""
+<script src=""
 <script>
 
 function decreaseContentSize()
@@ -44,20 +45,51 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
-    var startPosX = 150;
-    var startPosY = 150;
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    const startPosX = 150;
+    const startPosY = 150;
 
-    setTimeout(decreaseContentSize, 100);
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    decreaseContentSize();
 }
 
 function setUp() {
@@ -64,7 +96,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
         setTimeout(scrollTest, 0);
     }
 }

Modified: trunk/LayoutTests/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -16,6 +16,7 @@
 </style>
 
 <script src=""
+<script src=""
 <script>
 
 var deltaOfZero = false;
@@ -30,27 +31,61 @@
     testRunner.notifyDone();
 }
 
-function didScroll(event) {
+function didScroll(event)
+{
     if (event.wheelDeltaX == 0 && event.wheelDeltaY == 0)
         deltaOfZero = true;
 }
 
-function scrollTest()
+async function scrollTest()
 {
-    var startPosX = 100;
-    var startPosY = 100;
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForZero);
+    const startPosX = 100;
+    const startPosY = 100;
+
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForZero();
 }
 
-function setUp() {
+function setUp()
+{
     var scrolly = document.getElementById("scrolly");
     scrolly.addEventListener("mousewheel", didScroll);
 
@@ -57,8 +92,6 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     }
 }

Modified: trunk/LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -6,7 +6,8 @@
     overflow: scroll;
 }
 </style>
-
+<script src=""
+<script src=""
 <script>
 function checkForScroll()
 {
@@ -19,26 +20,57 @@
     testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
-    eventSender.mouseMoveTo(50, 50);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+    const events = [
+        {
+            type : "wheel",
+            viewX : 50,
+            viewY : 50,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -100,
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
 }
 
-function onLoad() {
+function onLoad()
+{
     window.addEventListener('mousewheel', function() { }, false);
 
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
-        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     }
 }

Modified: trunk/LayoutTests/tiled-drawing/scrolling/scroll-iframe-latched-selects.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/scroll-iframe-latched-selects.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/scroll-iframe-latched-selects.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
-<link rel="help" href=""
 <script src=""
+<script src=""
 </head>
 <body _onload_="setupTopLevel();">
 <script>
@@ -27,7 +27,8 @@
 
     finishJSTest();
 }
-function scrollRightMostSelect()
+
+async function scrollRightMostSelect()
 {
     if (selectLeft.scrollTop > 0)
         testPassed("Leftmost <select> was scrolled");
@@ -35,26 +36,58 @@
         testFailed("Leftmost <select> was not scrolled");
     previousSelectLeftScrollPosition = selectLeft.scrollTop;
 
-    var startPosX = Math.round(selectRight.offsetLeft) + 10;
-    var startPosY = Math.round(selectRight.offsetTop) + 10;
-    eventSender.monitorWheelEvents();
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "began", "none");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
-    eventSender.callAfterScrollingCompletes(checkForScroll);
+    const startPosX = Math.round(selectRight.offsetLeft) + 10;
+    const startPosY = Math.round(selectRight.offsetTop) + 10;
+
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    checkForScroll();
 }
 
-function scrollLeftMostSelect()
+async function scrollLeftMostSelect()
 {
-    var startPosX = Math.round(selectLeft.offsetLeft) + 10;
-    var startPosY = Math.round(selectLeft.offsetTop) + 10;
-    eventSender.monitorWheelEvents();
-    eventSender.mouseMoveTo(startPosX, startPosY);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "began", "none");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
-    eventSender.callAfterScrollingCompletes(scrollRightMostSelect);
+    const startPosX = Math.round(selectLeft.offsetLeft) + 10;
+    const startPosY = Math.round(selectLeft.offsetTop) + 10;
+
+    const events = [
+        {
+            type : "wheel",
+            viewX : startPosX,
+            viewY : startPosY,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
+    scrollRightMostSelect();
 }
 
 function setupTopLevel()

Modified: trunk/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -2,6 +2,7 @@
 <html>
 <head>
 <script src=""
+<script src=""
 </head>
 <body>
 <script>
@@ -21,29 +22,60 @@
         finishJSTest();
     }
 
-    function scrollTest()
+    async function scrollTest()
     {
         // Send a scroll while over the inner iframe.
-        var startPosX = 150;
-        var startPosY = 150;
-        eventSender.monitorWheelEvents();
-        eventSender.mouseMoveTo(startPosX, startPosY);
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
-        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-        eventSender.callAfterScrollingCompletes(checkForScroll);
+        const startPosX = 150;
+        const startPosY = 150;
+
+        const events = [
+            {
+                type : "wheel",
+                viewX : startPosX,
+                viewY : startPosY,
+                deltaY : -10,
+                phase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                phase : "changed"
+            },
+            {
+                type : "wheel",
+                phase : "ended"
+            },
+            {
+                type : "wheel",
+                deltaY : -10,
+                momentumPhase : "began"
+            },
+            {
+                type : "wheel",
+                deltaY : -100,
+                momentumPhase : "changed"
+            },
+            {
+                type : "wheel",
+                momentumPhase : "ended"
+            }
+        ];
+
+        await UIHelper.mouseWheelSequence({ events: events });
+        checkForScroll();
     }
 
     function setupTopLevel()
     {
-        if (window.eventSender)
+        if (window.eventSender) {
             setTimeout(scrollTest, 0);
-    
-        setTimeout(checkForScroll, 1000);
+            return;
+        }
     }
 </script>
     <iframe id="target" scrolling="yes" style="height: 400px; width: 500px;" 

Modified: trunk/LayoutTests/tiled-drawing/scrolling/wheel-events-with-no-delta.html (285429 => 285430)


--- trunk/LayoutTests/tiled-drawing/scrolling/wheel-events-with-no-delta.html	2021-11-08 21:44:46 UTC (rev 285429)
+++ trunk/LayoutTests/tiled-drawing/scrolling/wheel-events-with-no-delta.html	2021-11-08 21:52:43 UTC (rev 285430)
@@ -6,9 +6,11 @@
 }
 </style>
 
+<script src=""
 <script>
 
-function mouseWheelFired(e) {
+function mouseWheelFired(e)
+{
     if (e.wheelDelta == 0)
         document.getElementById('log').textContent = "FAIL. We got a wheel event with a delta of 0.";
 
@@ -16,15 +18,40 @@
         testRunner.notifyDone();
 }
 
-function scrollTest()
+async function scrollTest()
 {
-    eventSender.mouseMoveTo(20, 20);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'changed', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'continue');
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    const events = [
+        {
+            type : "wheel",
+            viewX : 20,
+            viewY : 20,
+            deltaY : -10,
+            phase : "began"
+        },
+        {
+            type : "wheel",
+            phase : "changed"
+        },
+        {
+            type : "wheel",
+            phase : "ended"
+        },
+        {
+            type : "wheel",
+            deltaY : -10,
+            momentumPhase : "began"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "changed"
+        },
+        {
+            type : "wheel",
+            momentumPhase : "ended"
+        }
+    ];
+
+    await UIHelper.mouseWheelSequence({ events: events });
 }
 
 function loaded()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to