Changeset 258701 in webkit


Ignore:
Timestamp:
Mar 19, 2020 9:03:04 AM (4 years ago)
Author:
Simon Fraser
Message:

Many tests relying on eventSender.monitorWheelEvents() are no longer flaky
https://bugs.webkit.org/show_bug.cgi?id=209272

Reviewed by Wenson Hsieh.

Remove tests from TestExpectations that were flakey because of bug 197819.

Fix some scroll-snap tests which were written before CSS OM View changes made document.body
not the scrolling element.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
  • tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt:
  • tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
Location:
trunk/LayoutTests
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r258700 r258701  
     12020-03-19  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Many tests relying on eventSender.monitorWheelEvents() are no longer flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=209272
     5
     6        Reviewed by Wenson Hsieh.
     7       
     8        Remove tests from TestExpectations that were flakey because of bug 197819.
     9
     10        Fix some scroll-snap tests which were written before CSS OM View changes made document.body
     11        not the scrolling element.
     12
     13        * platform/mac-wk2/TestExpectations:
     14        * platform/mac/TestExpectations:
     15        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
     16        * tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
     17        * tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt:
     18        * tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt:
     19        * tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
     20        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
     21        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
     22        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
     23        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
     24        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
     25        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
     26        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
     27        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
     28
    1292020-03-19  Eric Carlson  <eric.carlson@apple.com>
    230
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r258679 r258701  
    322322webkit.org/b/172544 [ Debug ] tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html [ Pass Failure ]
    323323
    324 webkit.org/b/136554 tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html [ Pass Failure ]
    325 webkit.org/b/139901 tiled-drawing/scrolling/frames/frameset-frame-scrollability.html [ Pass Failure ]
    326 
    327 webkit.org/b/167661 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html [ Pass Failure ]
    328 webkit.org/b/148407 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html [ Pass Failure ]
    329 webkit.org/b/148407 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html [ Pass Failure ]
    330 webkit.org/b/165196 tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html [ Pass Failure ]
    331 webkit.org/b/196115 tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html [ Skip ]
    332 
    333 webkit.org/b/148408 tiled-drawing/scrolling/root-overflow-with-mousewheel.html [ Pass Failure Timeout ]
    334 
    335324webkit.org/b/139820 fast/frames/lots-of-objects.html [ Pass Timeout ]
    336325webkit.org/b/139820 fast/frames/lots-of-iframes.html [ Pass Timeout ]
     
    592581webkit.org/b/161742 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/keyorder.htm [ Pass Failure ]
    593582
    594 webkit.org/b/161547 [ Debug ] tiled-drawing/scrolling/fixed/four-bars-zoomed.html [ Pass Failure ]
    595 webkit.org/b/188096 [ Release ] tiled-drawing/scrolling/fixed/four-bars-zoomed.html [ Pass Failure ]
    596 
    597 
    598583webkit.org/b/162081 editing/inserting/typing-space-to-trigger-smart-link.html [ Failure ]
    599584webkit.org/b/162081 editing/inserting/smart-quote-with-all-configurations.html [ Failure ]
     
    763748# Link preconnect is disabled on pre-High Sierra because the CFNetwork SPI is missing.
    764749[ Sierra ] http/tests/preconnect [ Skip ]
    765 
    766 webkit.org/b/171839 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html [ Pass Failure ]
    767750
    768751webkit.org/b/177687 http/tests/inspector/network/resource-sizes-memory-cache.html [ Pass Failure ]
     
    907890webkit.org/b/187828 [ Release ] fast/css-grid-layout/flex-content-sized-columns-resize.html [ Pass ImageOnlyFailure ]
    908891
    909 webkit.org/b/198661 scrollingcoordinator/mac/nested-sticky.html [ Pass ImageOnlyFailure Timeout ]
    910 
    911892webkit.org/b/198663 http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html [ Pass Timeout ]
    912893
     
    914895
    915896webkit.org/b/198921 [ Mojave+ ] webgpu/blend-color-triangle-strip.html [ Pass ImageOnlyFailure ]
    916 
    917 webkit.org/b/195635 scrollingcoordinator/mac/multiple-fixed.html [ Pass Timeout ]
    918897
    919898webkit.org/b/199651 [ Mojave Debug ] webgpu/whlsl/builtin-vectors-2.html [ Slow ]
     
    936915webkit.org/b/206708 fast/animation/request-animation-frame-iframe.html [ Pass Failure ]
    937916
    938 webkit.org/b/206940 [ Mojave+ ] tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html [ Pass Failure ]
    939 
    940917webkit.org/b/206961 [ Mojave ] media/media-fragments/TC0035.html [ Pass Failure ]
    941918
     
    950927webkit.org/b/207117 webgpu/whlsl/nested-loop.html [ Pass ImageOnlyFailure ]
    951928
    952 webkit.org/b/207120 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-then-proximity.html [ Pass Failure ]
    953 
    954929webkit.org/b/207127 webgpu/whlsl/buffer-vertex.html [ Pass ImageOnlyFailure ]
    955930
     
    10381013webkit.org/b/207844 storage/indexeddb/detached-iframe.html [ Pass Failure ]
    10391014
    1040 webkit.org/b/207848 [ Release ] fast/scrolling/latching/scroll-iframe-fragment.html [ Pass Failure ]
    1041 
    1042 webkit.org/b/207861 [ Release ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html [ Pass Failure ]
    1043 
    1044 webkit.org/b/148405 [ Release ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html [ Pass Failure ]
    1045 
    10461015webkit.org/b/207864 webgpu/whlsl/do-while-loop-continue.html [ Pass ImageOnlyFailure ]
    10471016
    10481017webkit.org/b/207938 http/wpt/crypto/derive-hmac-key-crash.any.html [ Pass Crash ]
    10491018
    1050 webkit.org/b/207953 [ Release ] fast/scrolling/latching/scroll-iframe-in-overflow.html [ Pass Failure ]
    1051 
    10521019webkit.org/b/207954 http/tests/inspector/network/har/har-page.html [ Pass Failure ]
    10531020
     
    10811048
    10821049webkit.org/b/209006 imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/085.html [ Pass Failure ]
    1083 
    1084 webkit.org/b/209013 fast/scrolling/momentum-scroll-with-borders.html [ Pass Timeout ]
    10851050
    10861051webkit.org/b/209018 [ Catalina ] webrtc/video-autoplay1.html [ Pass Failure ]
  • trunk/LayoutTests/platform/mac/TestExpectations

    r258674 r258701  
    17581758webkit.org/b/190882 [ Mojave+ ] animations/change-one-anim.html [ Pass Failure ]
    17591759
    1760 webkit.org/b/195635 scrollingcoordinator/mac/multiple-fixed.html [ Pass Timeout ]
    1761 
    17621760# <rdar://problem/48781098>
    17631761[ Catalina+ ] fast/images/animated-heics-draw.html [ Pass ]
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt

    r211662 r258701  
    22Scrollable Region
    33
    4 Count   DATA    Rev Count
    5 TOP TOP TOP TOP TOP     TOP TOP TOP TOP TOP     TOP TOP TOP TOP TOP
    6 1       0.1100  40
    7 2       0.1155  39
    8 3       0.2200  38
    9 4       0.2255  37
    10 5       0.3300  36
    11 6       0.3355  35
    12 7       0.4400  34
    13 8       0.4455  33
    14 9       0.5500  32
    15 10      0.5555  31
    16 11      0.6600  30
    17 12      0.6655  29
    18 13      0.7700  28
    19 14      0.7755  27
    20 15      0.8800  26
    21 16      0.8855  25
    22 17      0.9900  24
    23 18      0.9955  23
    24 19      0.9999  22
    25 20      1.0000  21
    26 21      1.0000  20
    27 22      0.9999  19
    28 23      0.9955  18
    29 24      0.9900  17
    30 25      0.8855  16
    31 26      0.8800  15
    32 27      0.7755  14
    33 28      0.7700  13
    34 29      0.6655  12
    35 30      0.6600  11
    36 31      0.5555  10
    37 32      0.5500  9
    38 33      0.4455  8
    39 34      0.4400  7
    40 35      0.3355  6
    41 36      0.3300  5
    42 37      0.2255  4
    43 38      0.2200  3
    44 39      0.1155  2
    45 40      0.1100  1
    46 END END END END END     END END END END END     END END END END END
     4Scrolled content
    475Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.
    486
     
    508
    519
     10Mouse moved to (28, 125)
     11PASS Scrollable div did not receive wheel events.
    5212PASS successfullyParsed is true
    5313
    5414TEST COMPLETE
    55 Mouse moved to (28, 125)
    56 PASS Scrollable div did not receive wheel events.
    5715(GraphicsLayer
    5816  (anchor 0.00 0.00)
    59   (bounds 2008.00 2281.00)
     17  (bounds 2008.00 2236.00)
    6018  (visible rect 0.00, 70.00 785.00 x 585.00)
    6119  (coverage rect 0.00, 70.00 785.00 x 585.00)
     
    6422  (children 1
    6523    (GraphicsLayer
    66       (bounds 2008.00 2281.00)
     24      (bounds 2008.00 2236.00)
    6725      (contentsOpaque 1)
    6826      (visible rect 0.00, 70.00 785.00 x 585.00)
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt

    r241934 r258701  
    1515  (max layout viewport origin (0,1636))
    1616  (behavior for fixed 0)
     17  (visual viewport smaller than layout viewport 1)
    1718  (children 4
    1819    (Fixed node
     
    8889          (visible rect 0.00, 0.00 0.00 x 0.00)
    8990          (coverage rect -597.00, -196.00 341.30 x 254.35)
    90           (intersects coverage rect 1)
     91          (intersects coverage rect 0)
    9192          (contentsScale 2.30)
    9293        )
     
    9899          (visible rect 0.00, 0.00 0.00 x 0.00)
    99100          (coverage rect 4.00, -497.00 341.30 x 254.35)
    100           (intersects coverage rect 1)
     101          (intersects coverage rect 0)
    101102          (contentsScale 2.30)
    102103        )
  • trunk/LayoutTests/tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt

    r209409 r258701  
    22  (scrollable area size 800 600)
    33  (contents size 800 600)
     4  (scrollable area parameters
     5    (horizontal scroll elasticity 2)
     6    (vertical scroll elasticity 2)
     7    (horizontal scrollbar mode 1)
     8    (vertical scrollbar mode 1))
    49  (layout viewport at (0,0) size 800x600)
    510  (min layout viewport origin (0,0))
     
    712  (synchronous event dispatch region for event wheel
    813    at (0,0) size 800x594)
     14  (behavior for fixed 0)
    915)
    1016
  • trunk/LayoutTests/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt

    r209409 r258701  
    22  (scrollable area size 800 600)
    33  (contents size 800 600)
     4  (scrollable area parameters
     5    (horizontal scroll elasticity 2)
     6    (vertical scroll elasticity 2)
     7    (horizontal scrollbar mode 1)
     8    (vertical scrollbar mode 1))
    49  (layout viewport at (0,0) size 800x600)
    510  (min layout viewport origin (0,0))
     
    712  (synchronous event dispatch region for event wheel
    813    at (0,166) size 280x434)
     14  (behavior for fixed 0)
    915)
    1016
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html

    r210560 r258701  
    1919            }
    2020        </style>
    21         <script src="../../../resources/js-test.js"></script>
     21        <script src="../../../resources/js-test-pre.js"></script>
    2222        <script>
    2323        window.jsTestIsAsync = true;
     
    5959
    6060            if (targetLabel == 'horizontalTarget')
    61                 setTimeout(function() { scrollGlideTest('verticalTarget') }, 0);
     61                setTimeout(() => { scrollGlideTest('verticalTarget') }, 0);
    6262            else   
    6363                finishJSTest();
     
    8383            var startPosX = windowPosition.x + 0.5 * iframeTarget.clientWidth;
    8484            var startPosY = windowPosition.y + 0.5 * iframeTarget.clientHeight;
     85            eventSender.monitorWheelEvents();
    8586            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    8687            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    8889            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'changed', 'none');
    8990            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
    90             eventSender.callAfterScrollingCompletes(function() { return checkForScrollSnap(targetLabel); });
     91            eventSender.callAfterScrollingCompletes(() => { return checkForScrollSnap(targetLabel); });
    9192        }
    9293
     
    9495        {
    9596            var iframeTarget = document.getElementById(targetLabel);
    96             var iframeBody = window.frames[targetLabel].document.body;
     97            var iframeScrollingElement = window.frames[targetLabel].contentDocument.scrollingElement;
    9798
    98             var actualPosition = iframeBody.scrollTop;
     99            var actualPosition = iframeScrollingElement.scrollTop;
    99100            var expectedPosition = iframeTarget.clientHeight;
    100101            if (targetLabel == 'horizontalTarget') {
    101                 actualPosition = iframeBody.scrollLeft;
     102                actualPosition = iframeScrollingElement.scrollLeft;
    102103                expectedPosition = iframeTarget.clientWidth;
    103104            }
     
    109110                testFailed("div did not honor snap points. Expected " + expectedPosition + ", but got " + actualPosition);
    110111
    111             setTimeout(function() { scrollSnapTest(targetLabel) }, 0);
     112            setTimeout(() => { scrollSnapTest(targetLabel) }, 0);
    112113        }
    113114
     
    116117            debug("Testing scroll-snap glide for " + targetLabel + ":");
    117118            var iframeTarget = document.getElementById(targetLabel);
    118             var iframeBody = window.frames[targetLabel].document.body;
     119            var iframeScrollingElement = window.frames[targetLabel].contentDocument.scrollingElement;
    119120 
    120121            var dx = 0;
    121122            var dy = 0;
    122123            if (targetLabel == 'horizontalTarget') {
    123                 iframeScrollPositionBeforeGlide = iframeBody.scrollLeft;
     124                iframeScrollPositionBeforeGlide = iframeScrollingElement.scrollLeft;
    124125                dx = -1;
    125126            } else {
    126                 iframeScrollPositionBeforeGlide = iframeBody.scrollTop;
     127                iframeScrollPositionBeforeGlide = iframeScrollingElement.scrollTop;
    127128                dy = -1;
    128129            }
     
    132133            var startPosX = windowPosition.x + 0.5 * iframeTarget.clientWidth;
    133134            var startPosY = windowPosition.y + 0.5 * iframeTarget.clientHeight;
     135            eventSender.monitorWheelEvents();
    134136            eventSender.mouseMoveTo(startPosX, startPosY);
    135137            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    141143            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'none', 'continue');
    142144            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
    143             eventSender.callAfterScrollingCompletes(function() { return checkForScrollGlide(targetLabel); });
     145            eventSender.callAfterScrollingCompletes(() => { return checkForScrollGlide(targetLabel) });
    144146        }
    145147
     
    147149        {
    148150            if (window.eventSender) {
    149                 eventSender.monitorWheelEvents();
    150151                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    151152                setTimeout(function() { scrollGlideTest('horizontalTarget') }, 0);
     
    161162            <div id="console"></div>
    162163        </div>
     164    <script src="../../../resources/js-test-post.js"></script>
    163165    </body>
    164166</html>
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html

    r235893 r258701  
    2727        window.jsTestIsAsync = true;
    2828
    29         var divTarget;
    30         var divScrollPositionBeforeGlide;
    31         var divScrollPositionBeforeSnap;
     29        var targetScroller;
     30        var scrollPositionBeforeGlide;
     31        var scrollPositionBeforeSnap;
    3232
    33         function checkForScrollSnap() {
     33        function checkForScrollSnap()
     34        {
    3435            // The div should have snapped back to the previous position
    35             if (divTarget.scrollLeft != divScrollPositionBeforeSnap)
    36                 testFailed("div did not snap back to proper location. Expected " + divScrollPositionBeforeSnap + ", but got " + divTarget.scrollLeft);
     36            if (targetScroller.scrollLeft != scrollPositionBeforeSnap)
     37                testFailed("div did not snap back to proper location. Expected " + scrollPositionBeforeSnap + ", but got " + targetScroller.scrollLeft);
    3738            else
    3839                testPassed("div honored snap points.");
     
    4142        }
    4243
    43         function scrollSnapTest() {
    44             // See where our div lives:
    45             pageScrollPositionBefore = document.scrollingElement.scrollLeft;
     44        function scrollSnapTest()
     45        {
     46            scrollPositionBeforeSnap = targetScroller.scrollLeft;
    4647
    47             divTarget = document.getElementById('target');
    48  
    49             divScrollPositionBeforeSnap = divTarget.scrollLeft;
    50 
    51             var startPosX = divTarget.offsetLeft + 20;
    52             var startPosY = divTarget.offsetTop + 20;
     48            var startPosX = targetScroller.offsetLeft + 20;
     49            var startPosY = targetScroller.offsetTop + 20;
     50            eventSender.monitorWheelEvents();
    5351            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    5452            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
     
    5957        }
    6058
    61         function checkForScrollGlide() {
     59        function checkForScrollGlide()
     60        {
    6261            // The div should have scrolled (glided) to the next snap point.
    63             if (divTarget.scrollLeft == window.innerWidth)
     62            if (targetScroller.scrollLeft == window.innerWidth)
    6463                testPassed("div scrolled to next window.");
    6564            else
    66                 testFailed("div did not honor snap points. Expected " + window.innerWidth + ", but got " + divTarget.scrollLeft);
     65                testFailed("div did not honor snap points. Expected " + window.innerWidth + ", but got " + targetScroller.scrollLeft);
    6766
    6867            setTimeout(scrollSnapTest, 0);
    6968        }
    7069
    71         function scrollGlideTest() {
    72             divTarget = document.getElementById('target');
    73  
    74             divScrollPositionBeforeGlide = divTarget.scrollLeft;
     70        function scrollGlideTest()
     71        {
     72            scrollPositionBeforeGlide = targetScroller.scrollLeft;
    7573
    76             var startPosX = divTarget.offsetLeft + 20;
    77             var startPosY = divTarget.offsetTop + 20;
     74            var startPosX = targetScroller.offsetLeft + 20;
     75            var startPosY = targetScroller.offsetTop + 20;
     76            eventSender.monitorWheelEvents();
    7877            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    7978            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
     
    8887        }
    8988
    90         function onLoad() {
    91 
     89        function onLoad()
     90        {
     91            targetScroller = document.scrollingElement;
    9292            if (window.eventSender) {
    93                 eventSender.monitorWheelEvents();
    9493                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    9594                setTimeout(scrollGlideTest, 0);
     
    110109        </script>
    111110    </head>
    112     <body onload="onLoad();" class="horizontalGallery" id="target">
     111    <body onload="onLoad();" class="horizontalGallery">
    113112        <div id="item0" class="colorBox"><div id="console"></div></div>
    114113        <div id="item1" class="colorBox"></div>
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html

    r235893 r258701  
    2727        window.jsTestIsAsync = true;
    2828
    29         var divTarget;
    30         var divScrollPositionBeforeGlide;
    31         var divScrollPositionBeforeSnap;
     29        var scrollingTarget;
     30        var scrollPositionBeforeGlide;
     31        var scrollPositionBeforeSnap;
    3232
    3333        function checkForScrollSnap() {
    3434            // The div should have snapped back to the previous position
    35             if (divTarget.scrollLeft != divScrollPositionBeforeSnap)
    36                 testFailed(`div did not snap back to proper location. ${divTarget.scrollLeft} vs. ${divScrollPositionBeforeSnap}`);
     35            if (scrollingTarget.scrollLeft != scrollPositionBeforeSnap)
     36                testFailed(`div did not snap back to proper location. ${scrollingTarget.scrollLeft} vs. ${scrollPositionBeforeSnap}`);
    3737            else
    3838                testPassed("div honored snap points.");
     
    4141        }
    4242
    43         function scrollSnapTest() {
    44             // See where our div lives:
    45             pageScrollPositionBefore = document.scrollingElement.scrollLeft;
     43        function scrollSnapTest()
     44        {
     45            scrollPositionBeforeSnap = scrollingTarget.scrollLeft;
    4646
    47             divTarget = document.getElementById('target');
    48  
    49             divScrollPositionBeforeSnap = divTarget.scrollLeft;
    50 
    51             var startPosX = divTarget.offsetLeft + 20;
    52             var startPosY = divTarget.offsetTop + 20;
     47            var startPosX = scrollingTarget.offsetLeft + 20;
     48            var startPosY = scrollingTarget.offsetTop + 20;
     49            eventSender.monitorWheelEvents();
    5350            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    5451            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
     
    5956        }
    6057
    61         function checkForScrollGlide() {
     58        function checkForScrollGlide()
     59        {
    6260            // The div should have scrolled (glided) to the next snap point.
    63             if (divTarget.scrollLeft == window.innerWidth)
     61            if (scrollingTarget.scrollLeft == window.innerWidth)
    6462                testPassed("div scrolled to next window.");
    6563            else
    66                 testFailed(`div did not honor snap points. ${divTarget.scrollLeft} vs. ${window.innerWidth}`);
     64                testFailed(`div did not honor snap points. ${scrollingTarget.scrollLeft} vs. ${window.innerWidth}`);
    6765
    6866            setTimeout(scrollSnapTest, 0);
    6967        }
    7068
    71         function scrollGlideTest() {
    72             divTarget = document.getElementById('target');
    73  
    74             divScrollPositionBeforeGlide = divTarget.scrollLeft;
     69        function scrollGlideTest()
     70        {
     71            scrollPositionBeforeGlide = scrollingTarget.scrollLeft;
    7572
    76             var startPosX = divTarget.offsetLeft + 20;
    77             var startPosY = divTarget.offsetTop + 20;
     73            var startPosX = scrollingTarget.offsetLeft + 20;
     74            var startPosY = scrollingTarget.offsetTop + 20;
     75            eventSender.monitorWheelEvents();
    7876            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    7977            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
     
    8886        }
    8987
    90         function onLoad() {
    91 
     88        function onLoad()
     89        {
     90            scrollingTarget = document.scrollingElement;
    9291            if (window.eventSender) {
    93                 eventSender.monitorWheelEvents();
    9492                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    9593                setTimeout(scrollGlideTest, 0);
     
    110108        </script>
    111109    </head>
    112     <body onload="onLoad();" class="horizontalGallery" id="target">
     110    <body onload="onLoad();" class="horizontalGallery">
    113111        <div id="item0" class="colorBox"><div id="console"></div></div>
    114112        <div id="item1" class="colorBox"></div>
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html

    r235893 r258701  
    2727        window.jsTestIsAsync = true;
    2828
    29         var divTarget;
    30         var divScrollPositionBeforeGlide;
    31         var divScrollPositionBeforeSnap;
     29        var targetScroller;
     30        var scrollPositionBeforeGlide;
     31        var scrollPositionBeforeSnap;
    3232
    33         function checkForScrollSnap() {
     33        function checkForScrollSnap()
     34        {
    3435            // The div should have snapped back to the previous position
    35             if (divTarget.scrollTop != divScrollPositionBeforeSnap)
    36                 testFailed(`div did not snap back to proper location. (${divTarget.scrollTop} vs. ${divScrollPositionBeforeSnap})`);
     36            if (targetScroller.scrollTop != scrollPositionBeforeSnap)
     37                testFailed(`div did not snap back to proper location. (${targetScroller.scrollTop} vs. ${scrollPositionBeforeSnap})`);
    3738            else
    3839                testPassed("div honored snap points.");
     
    4142        }
    4243
    43         function scrollSnapTest() {
     44        function scrollSnapTest()
     45        {
    4446            // See where our div lives:
    45             pageScrollPositionBefore = document.scrollingElement.scrollTop;
     47            scrollPositionBeforeSnap = targetScroller.scrollTop;
    4648
    47             divTarget = document.getElementById('target');
    48  
    49             divScrollPositionBeforeSnap = divTarget.scrollTop;
    50 
    51             var startPosX = divTarget.offsetLeft + 20;
    52             var startPosY = divTarget.offsetTop + 20;
     49            var startPosX = targetScroller.offsetLeft + 20;
     50            var startPosY = targetScroller.offsetTop + 20;
     51            eventSender.monitorWheelEvents();
    5352            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    5453            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     
    5958        }
    6059
    61         function checkForScrollGlide() {
     60        function checkForScrollGlide()
     61        {
    6262            // The div should have scrolled (glided) to the next snap point.
    63             if (divTarget.scrollTop == window.innerHeight)
     63            if (targetScroller.scrollTop == window.innerHeight)
    6464                testPassed("div scrolled to next window.");
    6565            else
    66                 testFailed(`div did not honor snap points. (${divTarget.scrollTop} vs. ${window.innerHeight})`);
     66                testFailed(`div did not honor snap points. (${targetScroller.scrollTop} vs. ${window.innerHeight})`);
    6767
    6868            setTimeout(scrollSnapTest, 0);
    6969        }
    7070
    71         function scrollGlideTest() {
    72             divTarget = document.getElementById('target');
    73  
    74             divScrollPositionBeforeGlide = divTarget.scrollTop;
     71        function scrollGlideTest()
     72        {
     73            scrollPositionBeforeGlide = targetScroller.scrollTop;
    7574
    76             var startPosX = divTarget.offsetLeft + 20;
    77             var startPosY = divTarget.offsetTop + 20;
     75            var startPosX = targetScroller.offsetLeft + 20;
     76            var startPosY = targetScroller.offsetTop + 20;
     77            eventSender.monitorWheelEvents();
    7878            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    7979            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     
    8888        }
    8989
    90         function onLoad() {
     90        function onLoad()
     91        {
     92            targetScroller = document.scrollingElement;
    9193            if (window.eventSender) {
    92                 eventSender.monitorWheelEvents();
    9394                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    9495                setTimeout(scrollGlideTest, 0);
     
    109110        </script>
    110111    </head>
    111     <body onload="onLoad();" class="verticalGallery" id="target">
     112    <body onload="onLoad();" class="verticalGallery">
    112113        <div id="item0" class="colorBox"><div id="console"></div></div>
    113114        <div id="item1" class="colorBox"></div>
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html

    r235893 r258701  
    2727        window.jsTestIsAsync = true;
    2828
    29         function scrollSnapTest() {
     29        function scrollSnapTest()
     30        {
    3031            var startPosX = document.body.offsetLeft + 20;
    3132            var startPosY = document.body.offsetTop + 20;
     33            eventSender.monitorWheelEvents();
    3234            eventSender.mouseMoveTo(startPosX, startPosY);
    3335            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     
    5052        }
    5153
    52         function onLoad() {
     54        function onLoad()
     55        {
    5356            if (window.eventSender) {
    54                 eventSender.monitorWheelEvents();
    5557                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    5658                setTimeout(scrollSnapTest, 0);
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html

    r235893 r258701  
    2727        window.jsTestIsAsync = true;
    2828
    29         var divTarget;
    30         var divScrollPositionBeforeGlide;
    31         var divScrollPositionBeforeSnap;
     29        var scrollingTarget;
     30        var scrollPositionBeforeGlide;
     31        var scrollPositionBeforeSnap;
    3232
    33         function checkForScrollSnap() {
     33        function checkForScrollSnap()
     34        {
    3435            // The div should have snapped back to the previous position
    35             if (divTarget.scrollTop != divScrollPositionBeforeSnap)
    36                 testFailed(`div did not snap back to proper location. (${divTarget.scrollTop} vs. ${divScrollPositionBeforeSnap})`);
     36            if (scrollingTarget.scrollTop != scrollPositionBeforeSnap)
     37                testFailed(`div did not snap back to proper location. (${scrollingTarget.scrollTop} vs. ${scrollPositionBeforeSnap})`);
    3738            else
    3839                testPassed("div honored snap points.");
     
    4142        }
    4243
    43         function scrollSnapTest() {
    44             // See where our div lives:
    45             pageScrollPositionBefore = document.scrollingElement.scrollTop;
     44        function scrollSnapTest()
     45        {
     46            scrollPositionBeforeSnap = scrollingTarget.scrollTop;
    4647
    47             divTarget = document.getElementById('target');
    48  
    49             divScrollPositionBeforeSnap = divTarget.scrollTop;
    50 
    51             var startPosX = divTarget.offsetLeft + 20;
    52             var startPosY = divTarget.offsetTop + 20;
     48            var startPosX = scrollingTarget.offsetLeft + 20;
     49            var startPosY = scrollingTarget.offsetTop + 20;
     50            eventSender.monitorWheelEvents();
    5351            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    5452            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     
    5957        }
    6058
    61         function checkForScrollGlide() {
     59        function checkForScrollGlide()
     60        {
    6261            // The div should have scrolled (glided) to the next snap point.
    63             if (divTarget.scrollTop == window.innerHeight)
     62            if (scrollingTarget.scrollTop == window.innerHeight)
    6463                testPassed("div scrolled to next window.");
    6564            else
    66                 testFailed(`div did not honor snap points. (${divTarget.scrollTop} vs. ${window.innerHeight})`);
     65                testFailed(`div did not honor snap points. (${scrollingTarget.scrollTop} vs. ${window.innerHeight})`);
    6766
    6867            setTimeout(scrollSnapTest, 0);
    6968        }
    7069
    71         function scrollGlideTest() {
    72             divTarget = document.getElementById('target');
    73  
    74             divScrollPositionBeforeGlide = divTarget.scrollTop;
     70        function scrollGlideTest()
     71        {
     72            scrollPositionBeforeGlide = scrollingTarget.scrollTop;
    7573
    76             var startPosX = divTarget.offsetLeft + 20;
    77             var startPosY = divTarget.offsetTop + 20;
     74            var startPosX = scrollingTarget.offsetLeft + 20;
     75            var startPosY = scrollingTarget.offsetTop + 20;
     76            eventSender.monitorWheelEvents();
    7877            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    7978            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
     
    8887        }
    8988
    90         function onLoad() {
    91 
     89        function onLoad()
     90        {
     91            scrollingTarget = document.scrollingElement;
    9292            if (window.eventSender) {
    93                 eventSender.monitorWheelEvents();
    9493                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    9594                setTimeout(scrollGlideTest, 0);
     
    110109        </script>
    111110    </head>
    112     <body onload="onLoad();" class="verticalGallery" id="target">
     111    <body onload="onLoad();" class="verticalGallery">
    113112        <div id="item0" class="colorBox"><div id="console"></div></div>
    114113        <div id="item1" class="colorBox"></div>
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html

    r210560 r258701  
    105105            var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
    106106            var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
     107            eventSender.monitorWheelEvents();
    107108            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    108109            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    152153            var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
    153154            var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
     155            eventSender.monitorWheelEvents();
    154156            eventSender.mouseMoveTo(startPosX, startPosY);
    155157            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    167169        {
    168170            if (window.eventSender) {
    169                 eventSender.monitorWheelEvents();
    170171                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    171172                setTimeout(function() { scrollGlideTest('horizontalTarget') }, 0);
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html

    r210560 r258701  
    113113            var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
    114114            var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
     115            eventSender.monitorWheelEvents();
    115116            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    116117            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    162163            var startPosX = windowPosition.x + divTarget.clientWidth - 10;
    163164            var startPosY = windowPosition.y + 50;
     165            eventSender.monitorWheelEvents();
    164166            eventSender.mouseMoveTo(startPosX, startPosY);
    165167            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    177179        {
    178180            if (window.eventSender) {
    179                 eventSender.monitorWheelEvents();
    180181                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    181182                setTimeout(function() { scrollGlideTest('horizontalTarget') }, 0);
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html

    r210560 r258701  
    107107            var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
    108108            var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
     109            eventSender.monitorWheelEvents();
    109110            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
    110111            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    154155            var startPosX = windowPosition.x + 0.5 * divTarget.clientWidth;
    155156            var startPosY = windowPosition.y + 0.5 * divTarget.clientHeight;
     157            eventSender.monitorWheelEvents();
    156158            eventSender.mouseMoveTo(startPosX, startPosY);
    157159            eventSender.mouseScrollByWithWheelAndMomentumPhases(dx, dy, 'began', 'none');
     
    169171        {
    170172            if (window.eventSender) {
    171                 eventSender.monitorWheelEvents();
    172173                internals.setPlatformMomentumScrollingPredictionEnabled(false);
    173174                setTimeout(function() { scrollGlideTest('horizontalTarget') }, 0);
Note: See TracChangeset for help on using the changeset viewer.