Title: [183628] trunk/LayoutTests
Revision
183628
Author
bfulg...@apple.com
Date
2015-04-30 10:21:55 -0700 (Thu, 30 Apr 2015)

Log Message

[Mac] Expand test infrastructure to support scrolling tests (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=144131

Reviewed by Eric Carlson.

Update the WK2 scrolling tests to use the new scroll trigger infrastructure to reduce the use of
timeouts.

* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
* platform/mac-wk2/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html:
* platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (183627 => 183628)


--- trunk/LayoutTests/ChangeLog	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/ChangeLog	2015-04-30 17:21:55 UTC (rev 183628)
@@ -1,3 +1,40 @@
+2015-04-30  Brent Fulgham  <bfulg...@apple.com>
+
+        [Mac] Expand test infrastructure to support scrolling tests (Part 3)
+        https://bugs.webkit.org/show_bug.cgi?id=144131
+
+        Reviewed by Eric Carlson.
+
+        Update the WK2 scrolling tests to use the new scroll trigger infrastructure to reduce the use of
+        timeouts.
+
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html:
+        * platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html:
+
 2015-04-30  Antti Koivisto  <an...@apple.com>
 
         These should be saying HTTP/1.1 not HTTP/1.0

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -52,21 +52,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-div display height = 350
-Mouse moved to (28, 475)
-Page before: 0, div before: 586
-Page after:  0, div after: 656
 PASS Page did not receive wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2326.00)
+  (bounds 2008.00 2266.00)
   (visible rect 0.00, 0.00 785.00 x 585.00)
   (coverage rect 0.00, 0.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2326.00)
+      (bounds 2008.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 0.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -52,22 +52,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-div display height = 350
-Mouse moved to (28, 475)
-Page before: 0, div before: 586
-Page after:  0, div after: 656
 PASS Page did not receive wheel events.
-Document was initial target for 8 of the wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2341.00)
+  (bounds 2008.00 2266.00)
   (visible rect 0.00, 0.00 785.00 x 585.00)
   (coverage rect 0.00, 0.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2341.00)
+      (bounds 2008.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 0.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -52,16 +52,11 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var divScrollPositionAfter = divTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", div before: " + divScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", div after: " + divScrollPositionAfter);
-
     if (pageScrollPositionBefore != pageScrollPositionAfter)
         testFailed("Page received wheel events.");
     else
         testPassed("Page did not receive wheel events.");
 
-    debug("Document was initial target for " + wheelCount + " of the wheel events.");
-
     if (window.internals) {
         document.getElementById('layers').innerText = internals.layerTreeAsText(document,
             internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
@@ -81,10 +76,8 @@
 
     // Scroll the #source until we reach the #target.
     var startPosX = Math.round(divTarget.offsetLeft) + 20;
-    debug("div display height = " + Math.round(divTarget.clientHeight));
-    var startPosY = Math.round(divTarget.offsetTop) + Math.round(divTarget.clientHeight) - 42; // One wheel turn before end.
+    var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
     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');
@@ -95,7 +88,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    checkForScroll();
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
 function setupTopLevel()
@@ -103,6 +96,8 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
+
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');
@@ -121,7 +116,7 @@
     </div>
     <div class="scrollable_region">
         <h3>Scrollable Region</h3>
-        <div id="target" style='overflow-y: auto; overflow-x: hidden; height: 350px;'>
+        <div id="target" style='overflow-y: auto; overflow-x: hidden; max-height: 350px;'>
             <table class="table" style='width: 99%'>
                 <tr><th>Count</th><th>DATA</th><th>Rev Count</th></tr>
                 <tr><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td></tr>

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -46,9 +46,6 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var divScrollPositionAfter = divTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", div before: " + divScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", div after: " + divScrollPositionAfter);
-
     if (pageScrollPositionBefore != pageScrollPositionAfter)
         testFailed("Page received wheel events.");
     else
@@ -73,10 +70,8 @@
 
     // Scroll the #source until we reach the #target.
     var startPosX = Math.round(divTarget.offsetLeft) + 20;
-    debug("div display height = " + Math.round(divTarget.clientHeight));
-    var startPosY = Math.round(divTarget.offsetTop) + Math.round(divTarget.clientHeight) - 42; // One wheel turn before end.
+    var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
     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');
@@ -87,7 +82,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    checkForScroll();
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
 function setupTopLevel()
@@ -96,6 +91,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -52,20 +52,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Mouse moved to (28, 125)
-Page before: 0, div before: 0
-Page after:  70, div after: 0
 PASS Scrollable div did not receive wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2311.00)
+  (bounds 2008.00 2266.00)
   (visible rect 0.00, 70.00 785.00 x 585.00)
   (coverage rect 0.00, 70.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2311.00)
+      (bounds 2008.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 70.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -53,20 +53,17 @@
 
 TEST COMPLETE
 Mouse moved to (28, 125)
-Page before: 0, div before: 0
-Page after:  70, div after: 0
 PASS Scrollable div did not receive wheel events.
-Document was initial target for 8 of the wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2326.00)
+  (bounds 2008.00 2281.00)
   (visible rect 0.00, 70.00 785.00 x 585.00)
   (coverage rect 0.00, 70.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2326.00)
+      (bounds 2008.00 2281.00)
       (contentsOpaque 1)
       (visible rect 0.00, 70.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -59,16 +59,11 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var divScrollPositionAfter = divTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", div before: " + divScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", div after: " + divScrollPositionAfter);
-
     if (divScrollPositionBefore != divScrollPositionAfter)
         testFailed("Scrollable div consumed wheel events.");
     else
         testPassed("Scrollable div did not receive wheel events.");
 
-    debug("Document was initial target for " + wheelCount + " of the wheel events.");
-
     if (window.internals) {
         document.getElementById('layers').innerText = internals.layerTreeAsText(document,
             internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
@@ -100,9 +95,8 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-
+    eventSender.callAfterScrollingCompletes(checkForScroll);
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-    setTimeout(checkForScroll, 500);
 }
 
 function setupTopLevel()
@@ -111,6 +105,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -53,9 +53,6 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var divScrollPositionAfter = divTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", div before: " + divScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", div after: " + divScrollPositionAfter);
-
     if (divScrollPositionBefore != divScrollPositionAfter)
         testFailed("Scrollable div consumed wheel events.");
     else
@@ -81,7 +78,6 @@
     var startPosX = Math.round(divTarget.offsetLeft) + 20;
     var startPosY = Math.round(divTarget.offsetTop) - 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');
@@ -92,9 +88,8 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-
+    eventSender.callAfterScrollingCompletes(checkForScroll);
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-    setTimeout(checkForScroll, 500);
 }
 
 function setupTopLevel()
@@ -103,6 +98,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -8,21 +8,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-IFrame display height = 500
-Mouse moved to (28, 566)
-Page before: 0, IFrame before: 416
-Page after:  0, IFrame after: 486
 PASS Page did not receive wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 785.00 2326.00)
+  (bounds 785.00 2266.00)
   (visible rect 0.00, 0.00 785.00 x 600.00)
   (coverage rect 0.00, 0.00 785.00 x 600.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 785.00 2326.00)
+      (bounds 785.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 0.00 785.00 x 600.00)
       (coverage rect 0.00, 0.00 1570.00 x 1800.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -8,22 +8,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-IFrame display height = 500
-Mouse moved to (28, 566)
-Page before: 0, IFrame before: 416
-Page after:  0, IFrame after: 486
 PASS Page did not receive wheel events.
-Document was initial target for 0 of the wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 785.00 2341.00)
+  (bounds 785.00 2266.00)
   (visible rect 0.00, 0.00 785.00 x 600.00)
   (coverage rect 0.00, 0.00 785.00 x 600.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 785.00 2341.00)
+      (bounds 785.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 0.00 785.00 x 600.00)
       (coverage rect 0.00, 0.00 1570.00 x 1800.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -28,16 +28,11 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", IFrame before: " + iFrameScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", IFrame after: " + iFrameScrollPositionAfter);
-
     if (pageScrollPositionBefore != pageScrollPositionAfter)
         testFailed("Page received wheel events.");
     else
         testPassed("Page did not receive wheel events.");
 
-    debug("Document was initial target for " + wheelCount + " of the wheel events.");
-
     if (window.internals) {
         document.getElementById('layers').innerText = internals.layerTreeAsText(document,
             internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
@@ -58,11 +53,9 @@
     iFrameScrollPositionBefore = iFrameBody.scrollTop;
 
     // Scroll the #source until we reach the #target.
-    var startPosX = iframeTarget.offsetLeft + 20;
-    debug("IFrame display height = " + iframeTarget.clientHeight);
-    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42; // One wheel turn before end.
-    eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
-    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
+    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');
@@ -73,7 +66,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    checkForScroll();
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
 function setupTopLevel()
@@ -82,6 +75,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -14,12 +14,10 @@
 
 function checkForScroll()
 {
+    // The IFrame should not have scrolled at all.
     var pageScrollPositionAfter = document.body.scrollTop;
     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", IFrame before: " + iFrameScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", IFrame after: " + iFrameScrollPositionAfter);
-
     if (pageScrollPositionBefore != pageScrollPositionAfter)
         testFailed("Page received wheel events.");
     else
@@ -44,11 +42,10 @@
 
     iFrameScrollPositionBefore = iFrameBody.scrollTop;
 
-    var startPosX = iframeTarget.offsetLeft + 20;
-    debug("IFrame display height = " + iframeTarget.clientHeight);
-    var startPosY = iframeTarget.offsetTop + iframeTarget.clientHeight - 42;
+    // 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);
-    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
@@ -59,7 +56,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    checkForScroll();
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
 function setupTopLevel()
@@ -68,6 +65,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -8,20 +8,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Mouse moved to (28, 66)
-Page before: 0, IFrame before: 0
-Page after:  70, IFrame after: 0
 PASS IFrame did not receive wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 785.00 2311.00)
+  (bounds 785.00 2266.00)
   (visible rect 0.00, 70.00 785.00 x 600.00)
   (coverage rect 0.00, 70.00 785.00 x 600.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 785.00 2311.00)
+      (bounds 785.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 70.00 785.00 x 600.00)
       (coverage rect 0.00, 0.00 1570.00 x 1800.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -8,21 +8,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Mouse moved to (28, 66)
-Page before: 0, IFrame before: 0
-Page after:  70, IFrame after: 0
 PASS IFrame did not receive wheel events.
-Document was initial target for 8 of the wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 785.00 2326.00)
+  (bounds 785.00 2266.00)
   (visible rect 0.00, 70.00 785.00 x 600.00)
   (coverage rect 0.00, 70.00 785.00 x 600.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 785.00 2326.00)
+      (bounds 785.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 70.00 785.00 x 600.00)
       (coverage rect 0.00, 0.00 1570.00 x 1800.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -35,16 +35,11 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", IFrame before: " + iFrameScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", IFrame after: " + iFrameScrollPositionAfter);
-
     if (iFrameScrollPositionBefore != iFrameScrollPositionAfter)
         testFailed("IFrame consumed wheel events.");
     else
         testPassed("IFrame did not receive wheel events.");
 
-    debug("Document was initial target for " + wheelCount + " of the wheel events.");
-
     if (window.internals) {
         document.getElementById('layers').innerText = internals.layerTreeAsText(document,
             internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
@@ -60,10 +55,11 @@
 
     iframeTarget = document.getElementById('target');
 
-    var startPosX = iframeTarget.offsetLeft + 20;
-    var startPosY = iframeTarget.offsetTop - 42;
+    // 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 + ")");
+    //debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
@@ -74,9 +70,9 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-    setTimeout(checkForScroll, 500);
 }
 
 function setupTopLevel()
@@ -85,6 +81,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');
@@ -98,11 +95,11 @@
 }
 
 </script>
-<div id="parent" style="height: 2000px">
+<div id="parent" style="height: 2000px;">
     <div id="source" style="height: 100px">
         Put mouse here and flick downwards
     </div>
-    <iframe id="target" name="target" style="border:solid 1px green; height: 500px; width: 500px;" 
+    <iframe id="target" name="target" style="border:solid 1px green; height: 300px; width: 500px;" 
      src= ""
      <div id='notToBeScrolled' style='height: 1000px; width: 1000px;'>
      TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP<br/><br/>

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -29,9 +29,6 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", IFrame before: " + iFrameScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", IFrame after: " + iFrameScrollPositionAfter);
-
     if (iFrameScrollPositionBefore != iFrameScrollPositionAfter)
         testFailed("IFrame consumed wheel events.");
     else
@@ -51,11 +48,11 @@
     iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop;
 
     iframeTarget = document.getElementById('target');
-    
-    var startPosX = iframeTarget.offsetLeft + 20;
-    var startPosY = iframeTarget.offsetTop - 42; // Slightly more than one wheel scroll away from the IFrame
+
+    // 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');
@@ -66,9 +63,9 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-    setTimeout(checkForScroll, 500);
 }
 
 function setupTopLevel()
@@ -77,6 +74,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -10,20 +10,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Mouse moved to (30, 127)
-Page before: 0, select before: 0
-Page after:  70, select after: 0
 PASS Select did not receive wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2311.00)
+  (bounds 2008.00 2266.00)
   (visible rect 0.00, 70.00 785.00 x 585.00)
   (coverage rect 0.00, 70.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2311.00)
+      (bounds 2008.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 70.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -10,21 +10,17 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Mouse moved to (30, 127)
-Page before: 0, select before: 0
-Page after:  70, select after: 0
 PASS Select did not receive wheel events.
-Document was initial target for 8 of the wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2326.00)
+  (bounds 2008.00 2266.00)
   (visible rect 0.00, 70.00 785.00 x 585.00)
   (coverage rect 0.00, 70.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2326.00)
+      (bounds 2008.00 2266.00)
       (contentsOpaque 1)
       (visible rect 0.00, 70.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -59,16 +59,11 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var selectScrollPositionAfter = selectTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", select before: " + selectScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", select after: " + selectScrollPositionAfter);
-
     if (selectScrollPositionBefore != selectScrollPositionAfter)
         testFailed("Select consumed wheel events.");
     else
         testPassed("Select did not receive wheel events.");
 
-    debug("Document was initial target for " + wheelCount + " of the wheel events.");
-
     if (window.internals) {
         document.getElementById('layers').innerText = internals.layerTreeAsText(document,
             internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
@@ -85,10 +80,10 @@
 
     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);
-    debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
@@ -99,9 +94,9 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-    setTimeout(checkForScroll, 500);
 }
 
 function setupTopLevel()
@@ -110,6 +105,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -53,9 +53,6 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var selectScrollPositionAfter = selectTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", select before: " + selectScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", select after: " + selectScrollPositionAfter);
-
     if (selectScrollPositionBefore != selectScrollPositionAfter)
         testFailed("Select consumed wheel events.");
     else
@@ -81,7 +78,6 @@
     var startPosX = Math.round(selectTarget.offsetLeft) + 20;
     var startPosY = Math.round(selectTarget.offsetTop) - 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');
@@ -92,9 +88,9 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 
     // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-    setTimeout(checkForScroll, 500);
 }
 
 function setupTopLevel()
@@ -103,6 +99,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -12,19 +12,17 @@
 TEST COMPLETE
 div display height = 111
 Mouse moved to (30, 238)
-Page before: 0, select before: 70
-Page after:  0, select after: 140
 PASS Page did not receive wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2326.00)
+  (bounds 2008.00 2296.00)
   (visible rect 0.00, 0.00 785.00 x 585.00)
   (coverage rect 0.00, 0.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2326.00)
+      (bounds 2008.00 2296.00)
       (contentsOpaque 1)
       (visible rect 0.00, 0.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt	2015-04-30 17:21:55 UTC (rev 183628)
@@ -12,20 +12,18 @@
 TEST COMPLETE
 div display height = 111
 Mouse moved to (30, 238)
-Page before: 0, select before: 70
-Page after:  0, select after: 140
 PASS Page did not receive wheel events.
 Document was initial target for 8 of the wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2341.00)
+  (bounds 2008.00 2311.00)
   (visible rect 0.00, 0.00 785.00 x 585.00)
   (coverage rect 0.00, 0.00 785.00 x 585.00)
   (intersects coverage rect 1)
   (contentsScale 1.00)
   (children 1
     (GraphicsLayer
-      (bounds 2008.00 2341.00)
+      (bounds 2008.00 2311.00)
       (contentsOpaque 1)
       (visible rect 0.00, 0.00 785.00 x 585.00)
       (coverage rect 0.00, 0.00 1570.00 x 1755.00)

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -52,9 +52,6 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var selectScrollPositionAfter = selectTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", select before: " + selectScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", select after: " + selectScrollPositionAfter);
-
     if (pageScrollPositionBefore != pageScrollPositionAfter)
         testFailed("Page received wheel events.");
     else
@@ -79,6 +76,7 @@
 
     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;
@@ -94,7 +92,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    checkForScroll();
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
 function setupTopLevel()
@@ -103,6 +101,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -46,9 +46,6 @@
     var pageScrollPositionAfter = document.body.scrollTop;
     var selectScrollPositionAfter = selectTarget.scrollTop;
 
-    debug("Page before: " + pageScrollPositionBefore + ", select before: " + selectScrollPositionBefore);
-    debug("Page after:  " + pageScrollPositionAfter + ", select after: " + selectScrollPositionAfter);
-
     if (pageScrollPositionBefore != pageScrollPositionAfter)
         testFailed("Page received wheel events.");
     else
@@ -87,7 +84,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    checkForScroll();
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
 function setupTopLevel()
@@ -96,6 +93,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     } else {
         var messageLocation = document.getElementById('parent');

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/overflow-scroll-zero-delta-wheel-events.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -50,8 +50,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-
-    setTimeout(checkForZero, 0);
+    eventSender.callAfterScrollingCompletes(checkForZero);
 }
 
 function setUp() {
@@ -62,6 +61,7 @@
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
 
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     }
 }

Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html (183627 => 183628)


--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html	2015-04-30 17:17:59 UTC (rev 183627)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html	2015-04-30 17:21:55 UTC (rev 183628)
@@ -32,7 +32,7 @@
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
-    setTimeout(checkForScroll, 500);
+    eventSender.callAfterScrollingCompletes(checkForScroll);
 }
 
 function onLoad() {
@@ -41,6 +41,7 @@
     if (window.eventSender) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
+        eventSender.monitorWheelEvents();
         setTimeout(scrollTest, 0);
     }
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to