REGRESSION (r252205?): [ Mac wk2 ] tiled-drawing/scrolling/fast-scroll-select-latched...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2020 07:21:53 +0000 (07:21 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2020 07:21:53 +0000 (07:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=206296

Reviewed by Ryosuke Niwa.

Attempt to de-flake this test. It was using js-test-pre/post, but not jsTestIsAsync/finishJSTest(), and seemed to sometimes
dump testPassed() a second even after notifyDone() was called. The <pre> is made fixed size so that the length of the layer
tree dump doesn't change the layer sizes.

Also clean it up to remove unused CSS and script.

* platform/mac-wk2/TestExpectations:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254793 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt
LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html

index c65a0d3..5600c92 100644 (file)
@@ -1,3 +1,20 @@
+2020-01-17  Simon Fraser  <simon.fraser@apple.com>
+
+        REGRESSION (r252205?): [ Mac wk2 ] tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html became very flaky
+        https://bugs.webkit.org/show_bug.cgi?id=206296
+
+        Reviewed by Ryosuke Niwa.
+
+        Attempt to de-flake this test. It was using js-test-pre/post, but not jsTestIsAsync/finishJSTest(), and seemed to sometimes
+        dump testPassed() a second even after notifyDone() was called. The <pre> is made fixed size so that the length of the layer
+        tree dump doesn't change the layer sizes.
+
+        Also clean it up to remove unused CSS and script.
+
+        * platform/mac-wk2/TestExpectations:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
+        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html:
+
 2020-01-17  Lauro Moura  <lmoura@igalia.com>
 
         [GTK] Gardening mouse cursor style change tests
index 70f6d83..37a18d8 100644 (file)
@@ -927,5 +927,3 @@ webkit.org/b/203256 [ Debug ] imported/w3c/web-platform-tests/webrtc/RTCPeerConn
 webkit.org/b/205301 [ Mojave+ ] inspector/canvas/requestShaderSource-webgpu.html [ Pass Failure ]
 
 webkit.org/b/205808 fast/text/international/unicode-bidi-other-neutrals.html [ Pass Failure ]
-
-webkit.org/b/206296 [ Debug ] tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html [ Pass Failure ]
\ No newline at end of file
index aa77b7f..3f266d7 100644 (file)
@@ -7,20 +7,20 @@ Tests that a select doesn't consume wheel events when scroll is latched to main
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS Select did not receive wheel events.
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS Select did not receive wheel events.
 (GraphicsLayer
   (anchor 0.00 0.00)
-  (bounds 2008.00 2266.00)
+  (bounds 2008.00 2221.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 2266.00)
+      (bounds 2008.00 2221.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)
index ebed5a9..d680cd1 100644 (file)
     width: 680px;
 }
 
-.table td, .table th {
-    padding: 2px;
-}
-
-.table th {
-    height: 20px;
-    text-align: left;
-    font-weight: strong;
-}
-
-.table tr:nth-child(odd) {
-    background: #f3f3f3;
-}
-
 .scrollable_select option:nth-child(odd) {
     background: #f3f3f3;
 }
 
+pre {
+    max-height: 200px;
+    max-width: 200px;
+}
 </style>
 <script src="../../resources/js-test-pre.js"></script>
 <script>
-var wheelCount = 0;
-function onScrollWheel(evt) {
-    wheelCount = wheelCount + 1;
-}
-
-function onLoad() {
-    document.addEventListener("mousewheel", onScrollWheel);
-    window.addEventListener("scroll", onPageScroll);
-    setupTopLevel();
-}
-</script>
-</head>
-<body onload="onLoad();">
-<script>
+    window.jsTestIsAsync = true;
 
-var selectTarget;
-var pageScrollPositionBefore;
-var selectScrollPositionBefore;
-var continueCount = 5;
+    var selectTarget;
+    var pageScrollPositionBefore;
+    var selectScrollPositionBefore;
 
-function onPageScroll()
-{
-    if (document.scrollingElement.scrollTop >= 70)
-        checkForScroll();
-}
-
-function checkForScroll()
-{
-    // The select should not have scrolled at all.
-    var pageScrollPositionAfter = document.scrollingElement.scrollTop;
-    var selectScrollPositionAfter = selectTarget.scrollTop;
-
-    if (selectScrollPositionBefore != selectScrollPositionAfter)
-        testFailed("Select consumed wheel events.");
-    else
-        testPassed("Select did not receive wheel events.");
-
-    if (window.internals) {
-        document.getElementById('layers').innerText = internals.layerTreeAsText(document,
-            internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+    function onPageScroll()
+    {
+        if (document.scrollingElement.scrollTop >= 70)
+            checkForScroll();
     }
 
-    testRunner.notifyDone();
-}
-
-function scrollTest()
-{
-    pageScrollPositionBefore = document.scrollingElement.scrollTop;
-
-    selectTarget = document.getElementById('target');
+    function checkForScroll()
+    {
+        // The select should not have scrolled at all.
+        var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+        var selectScrollPositionAfter = selectTarget.scrollTop;
 
-    selectScrollPositionBefore = selectTarget.scrollTop;
+        if (selectScrollPositionBefore != selectScrollPositionAfter)
+            testFailed("Select consumed wheel events.");
+        else
+            testPassed("Select did not receive wheel events.");
 
-    // 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);
+        if (window.internals) {
+            document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+                internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+        }
 
-    // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-}
-
-function setupTopLevel()
-{
-    if (window.eventSender) {
-        testRunner.dumpAsText();
-        testRunner.waitUntilDone();
+        finishJSTest();
+    }
 
-        eventSender.monitorWheelEvents();
-        setTimeout(scrollTest, 0);
-    } else {
-        var messageLocation = document.getElementById('parent');
-        var message = document.createElement('div');
-        message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
-            + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll down<br/>"
-            + "past the selectTarget.<br/><br/>"
-            + "You should not see the 'content21' label if this test is successful.</p>";
-        messageLocation.appendChild(message);
+    function scrollTest()
+    {
+        selectTarget = document.getElementById('target');
+
+        pageScrollPositionBefore = document.scrollingElement.scrollTop;
+        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);
+
+        // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
     }
-}
 
+    function setupTest()
+    {
+        window.addEventListener("scroll", onPageScroll);
+
+        if (window.eventSender) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+
+            eventSender.monitorWheelEvents();
+            setTimeout(scrollTest, 0);
+        } else {
+            var messageLocation = document.getElementById('parent');
+            var message = document.createElement('div');
+            message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+                + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll down<br/>"
+                + "past the selectTarget.<br/><br/>"
+                + "You should not see the 'content21' label if this test is successful.</p>";
+            messageLocation.appendChild(message);
+        }
+    }
+    
+    window.addEventListener('load', setupTest, false);
 </script>
+</head>
+<body>
 <div id="parent" style="height: 2000px; width: 2000px;">
     <div id="source" style="height: 100px; width: 500px;">
         Put mouse here and flick downwards