Changeset 251242 in webkit


Ignore:
Timestamp:
Oct 17, 2019 10:02:41 AM (5 years ago)
Author:
Simon Fraser
Message:

Two fast/scrolling/ios/touch-scroll* tests failing in iOS 13
https://bugs.webkit.org/show_bug.cgi?id=203070
rdar://problem/51756254

Reviewed by Wenson Hsieh.

For some reason the uiController.dragFromPointToPoint() in these tests was too long
to trigger scrolling (maybe an OS change). Fix them to use UIHelper and a shorter
duration, and also to not be sensitive to the exact distance scrolled.

  • fast/scrolling/ios/touch-scroll-pointer-events-none-expected.txt:
  • fast/scrolling/ios/touch-scroll-pointer-events-none.html:
  • fast/scrolling/ios/touch-scroll-visibility-hidden-expected.txt:
  • fast/scrolling/ios/touch-scroll-visibility-hidden.html:
  • platform/ios-wk2/TestExpectations:
  • resources/ui-helper.js:

(window.UIHelper.dragFromPointToPoint):

Location:
trunk/LayoutTests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r251241 r251242  
     12019-10-17  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Two fast/scrolling/ios/touch-scroll* tests failing in iOS 13
     4        https://bugs.webkit.org/show_bug.cgi?id=203070
     5        rdar://problem/51756254
     6
     7        Reviewed by Wenson Hsieh.
     8       
     9        For some reason the uiController.dragFromPointToPoint() in these tests was too long
     10        to trigger scrolling (maybe an OS change). Fix them to use UIHelper and a shorter
     11        duration, and also to not be sensitive to the exact distance scrolled.
     12
     13        * fast/scrolling/ios/touch-scroll-pointer-events-none-expected.txt:
     14        * fast/scrolling/ios/touch-scroll-pointer-events-none.html:
     15        * fast/scrolling/ios/touch-scroll-visibility-hidden-expected.txt:
     16        * fast/scrolling/ios/touch-scroll-visibility-hidden.html:
     17        * platform/ios-wk2/TestExpectations:
     18        * resources/ui-helper.js:
     19        (window.UIHelper.dragFromPointToPoint):
     20
    1212019-10-17  Simon Fraser  <simon.fraser@apple.com>
    222
  • trunk/LayoutTests/fast/scrolling/ios/touch-scroll-pointer-events-none-expected.txt

    r201901 r251242  
    33swipe complete
    44PASS scroller.scrollTop is 0
    5 PASS document.scrollingElement.scrollTop is 90
     5PASS documentDidScroll is true
    66PASS successfullyParsed is true
    77
  • trunk/LayoutTests/fast/scrolling/ios/touch-scroll-pointer-events-none.html

    r244628 r251242  
    4242    </style>
    4343    <script src="../../../resources/js-test-pre.js"></script>
     44    <script src="../../../resources/ui-helper.js"></script>
    4445    <script>
    4546        window.jsTestIsAsync = true;
    4647
    47         function getUIScript()
    48         {
    49             return `
    50             (function() {
    51                 uiController.dragFromPointToPoint(60, 200, 60, 100, 0.5, function() {
    52                     uiController.uiScriptComplete("");
    53                 });
    54             })();`
    55         }
    56 
    5748        var hitElement;
    58         function runTest()
     49        var documentDidScroll;
     50        async function runTest()
    5951        {
    6052            hitElement = document.elementFromPoint(20, 20);
     
    6456            shouldBe("scroller.scrollTop", "0");
    6557
    66             if (testRunner.runUIScript) {
    67                 testRunner.runUIScript(getUIScript(), function() {
    68                     setTimeout(function() {
    69                         debug("swipe complete");
    70                         shouldBe("scroller.scrollTop", "0");
    71                         shouldBe("document.scrollingElement.scrollTop", "90");
    72                         finishJSTest();
    73                     }, 0);
    74                 });
    75             }
     58            await UIHelper.callFunctionAndWaitForScrollToFinish(async () => {
     59                await UIHelper.dragFromPointToPoint(60, 200, 60, 100, 0.25);
     60            });
     61
     62            debug("swipe complete");
     63            shouldBe("scroller.scrollTop", "0");
     64           
     65            documentDidScroll = document.scrollingElement.scrollTop > 0;
     66            shouldBeTrue("documentDidScroll");
     67            finishJSTest();
    7668        }
    7769        window.addEventListener('load', runTest, false);
  • trunk/LayoutTests/fast/scrolling/ios/touch-scroll-visibility-hidden-expected.txt

    r200609 r251242  
    33swipe complete
    44PASS scroller.scrollTop is 0
    5 PASS document.scrollingElement.scrollTop is 90
     5PASS documentDidScroll is true
    66PASS successfullyParsed is true
    77
  • trunk/LayoutTests/fast/scrolling/ios/touch-scroll-visibility-hidden.html

    r244628 r251242  
    4343    </style>
    4444    <script src="../../../resources/js-test-pre.js"></script>
     45    <script src="../../../resources/ui-helper.js"></script>
    4546    <script>
    4647        window.jsTestIsAsync = true;
    4748
    48         function getUIScript()
    49         {
    50             return `
    51             (function() {
    52                 uiController.dragFromPointToPoint(60, 200, 60, 100, 0.5, function() {
    53                     uiController.uiScriptComplete("");
    54                 });
    55             })();`
    56         }
    57 
    5849        var hitElement;
    59         function runTest()
     50        var documentDidScroll;
     51        async function runTest()
    6052        {
    6153            hitElement = document.elementFromPoint(20, 20);
     
    6557            shouldBe("scroller.scrollTop", "0");
    6658
    67             if (testRunner.runUIScript) {
    68                 testRunner.runUIScript(getUIScript(), function() {
    69                     setTimeout(function() {
    70                         debug("swipe complete");
    71                         shouldBe("scroller.scrollTop", "0");
    72                         shouldBe("document.scrollingElement.scrollTop", "90");
    73                         finishJSTest();
    74                     }, 0);
    75                 });
    76             }
     59            await UIHelper.callFunctionAndWaitForScrollToFinish(async () => {
     60                await UIHelper.dragFromPointToPoint(60, 200, 60, 100, 0.25);
     61            });
     62
     63            debug("swipe complete");
     64            shouldBe("scroller.scrollTop", "0");
     65           
     66            documentDidScroll = document.scrollingElement.scrollTop > 0;
     67            shouldBeTrue("documentDidScroll");
     68            finishJSTest();
    7769        }
    7870        window.addEventListener('load', runTest, false);
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r251109 r251242  
    13601360mathml/focus-event-handling.html [ Failure ]
    13611361
    1362 # <rdar://problem/51756254>REGRESSION (r244582-r244596) Layout tests fast/scrolling/ios/touch-scroll-visibility-hidden.html fast/scrolling/ios/touch-scroll-pointer-events-none.html are failing
    1363 fast/scrolling/ios/touch-scroll-pointer-events-none.html [ Failure ]
    1364 fast/scrolling/ios/touch-scroll-visibility-hidden.html [ Failure ]
    13651362# <rdar://problem/52962272> fast/scrolling/ios/body-overflow-hidden.html is an Image failure
    13661363fast/scrolling/ios/body-overflow-hidden.html [ Pass ImageOnlyFailure ]
    1367 
  • trunk/LayoutTests/resources/ui-helper.js

    r250392 r251242  
    10081008            testRunner.runUIScript(`(() => {
    10091009                uiController.dragFromPointToPoint(${fromX}, ${fromY}, ${toX}, ${toY}, ${duration}, () => {
    1010                     uiController.uiScriptComplete("");
     1010                    uiController.uiScriptComplete();
    10111011                });
    10121012            })();`, resolve);
Note: See TracChangeset for help on using the changeset viewer.