Title: [248120] branches/safari-608.1-branch/LayoutTests
Revision
248120
Author
ryanhad...@apple.com
Date
2019-08-01 12:52:24 -0700 (Thu, 01 Aug 2019)

Log Message

Cherry-pick layout test changes for r247866. rdar://problem/53648067

    Unable to tap/double tap to open files/folders in Google Drive in Safari
    https://bugs.webkit.org/show_bug.cgi?id=200096
    <rdar://problem/52748552>

    Reviewed by Wenson Hsieh.

    1. Rebaseline (progression).
    2. Payment request tests activate elements by tapping on them at a high speed, triggering double clicks instead. Let's slow them down a bit.

    * fast/events/touch/ios/double-tap-for-double-click3-expected.txt:
    * http/tests/adClickAttribution/anchor-tag-attributes-validation.html:
    * http/tests/resources/payment-request.js:
    (activateThen):
    * resources/ui-helper.js:
    (window.UIHelper.activateElementAtHumanSpeed.return.new.Promise):
    (window.UIHelper.activateElementAtHumanSpeed):
    * tests-options.json:

Modified Paths

Diff

Modified: branches/safari-608.1-branch/LayoutTests/ChangeLog (248119 => 248120)


--- branches/safari-608.1-branch/LayoutTests/ChangeLog	2019-08-01 19:50:40 UTC (rev 248119)
+++ branches/safari-608.1-branch/LayoutTests/ChangeLog	2019-08-01 19:52:24 UTC (rev 248120)
@@ -1,3 +1,25 @@
+2019-07-26  Ryan Haddad  <ryanhad...@apple.com>
+
+        Cherry-pick layout test changes for r247866. rdar://problem/53648067
+
+    Unable to tap/double tap to open files/folders in Google Drive in Safari
+    https://bugs.webkit.org/show_bug.cgi?id=200096
+    <rdar://problem/52748552>
+
+    Reviewed by Wenson Hsieh.
+
+    1. Rebaseline (progression).
+    2. Payment request tests activate elements by tapping on them at a high speed, triggering double clicks instead. Let's slow them down a bit.
+
+    * fast/events/touch/ios/double-tap-for-double-click3-expected.txt:
+    * http/tests/adClickAttribution/anchor-tag-attributes-validation.html:
+    * http/tests/resources/payment-request.js:
+    (activateThen):
+    * resources/ui-helper.js:
+    (window.UIHelper.activateElementAtHumanSpeed.return.new.Promise):
+    (window.UIHelper.activateElementAtHumanSpeed):
+    * tests-options.json:
+
 2019-07-29  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r247880. rdar://problem/53647904

Modified: branches/safari-608.1-branch/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt (248119 => 248120)


--- branches/safari-608.1-branch/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt	2019-08-01 19:50:40 UTC (rev 248119)
+++ branches/safari-608.1-branch/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt	2019-08-01 19:52:24 UTC (rev 248120)
@@ -1,14 +1,14 @@
-CONSOLE MESSAGE: line 165: adcampaignid must have a non-negative value less than or equal to 63 for Ad Click Attribution.
-CONSOLE MESSAGE: line 165: adcampaignid must have a non-negative value less than or equal to 63 for Ad Click Attribution.
-CONSOLE MESSAGE: line 165: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
-CONSOLE MESSAGE: line 165: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
-CONSOLE MESSAGE: line 165: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
-CONSOLE MESSAGE: line 165: addestination could not be converted to a valid HTTP-family URL.
-CONSOLE MESSAGE: line 165: addestination could not be converted to a valid HTTP-family URL.
-CONSOLE MESSAGE: line 165: addestination could not be converted to a valid HTTP-family URL.
-CONSOLE MESSAGE: line 165: Both adcampaignid and addestination need to be set for Ad Click Attribution to work.
-CONSOLE MESSAGE: line 165: Both adcampaignid and addestination need to be set for Ad Click Attribution to work.
-CONSOLE MESSAGE: line 165: addestination can not be the same site as the current website.
+CONSOLE MESSAGE: line 192: adcampaignid must have a non-negative value less than or equal to 63 for Ad Click Attribution.
+CONSOLE MESSAGE: line 192: adcampaignid must have a non-negative value less than or equal to 63 for Ad Click Attribution.
+CONSOLE MESSAGE: line 192: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
+CONSOLE MESSAGE: line 192: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
+CONSOLE MESSAGE: line 192: adcampaignid can not be converted to a non-negative integer which is required for Ad Click Attribution.
+CONSOLE MESSAGE: line 192: addestination could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: line 192: addestination could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: line 192: addestination could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: line 192: Both adcampaignid and addestination need to be set for Ad Click Attribution to work.
+CONSOLE MESSAGE: line 192: Both adcampaignid and addestination need to be set for Ad Click Attribution to work.
+CONSOLE MESSAGE: line 192: addestination can not be the same site as the current website.
 Test for validity of ad click attribution attributes on anchor tags.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Modified: branches/safari-608.1-branch/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html (248119 => 248120)


--- branches/safari-608.1-branch/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html	2019-08-01 19:50:40 UTC (rev 248119)
+++ branches/safari-608.1-branch/LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html	2019-08-01 19:52:24 UTC (rev 248120)
@@ -25,10 +25,7 @@
     }
 
     function activateElement(elementID, callback) {
-        var element = document.getElementById(elementID);
-        var centerX = element.offsetLeft + element.offsetWidth / 2;
-        var centerY = element.offsetTop + element.offsetHeight / 2;
-        UIHelper.activateAt(centerX, centerY).then(
+        UIHelper.activateElementAtHumanSpeed(document.getElementById(elementID)).then(
             function () {
                 callback();
             },

Modified: branches/safari-608.1-branch/LayoutTests/http/tests/resources/payment-request.js (248119 => 248120)


--- branches/safari-608.1-branch/LayoutTests/http/tests/resources/payment-request.js	2019-08-01 19:50:40 UTC (rev 248119)
+++ branches/safari-608.1-branch/LayoutTests/http/tests/resources/payment-request.js	2019-08-01 19:52:24 UTC (rev 248120)
@@ -8,7 +8,7 @@
             resolve(completion());
         };
         document.body.insertBefore(button, document.body.firstChild);
-        UIHelper.activateElement(button);
+        UIHelper.activateElementAtHumanSpeed(button);
     });
 }
 

Modified: branches/safari-608.1-branch/LayoutTests/resources/ui-helper.js (248119 => 248120)


--- branches/safari-608.1-branch/LayoutTests/resources/ui-helper.js	2019-08-01 19:50:40 UTC (rev 248119)
+++ branches/safari-608.1-branch/LayoutTests/resources/ui-helper.js	2019-08-01 19:52:24 UTC (rev 248120)
@@ -181,6 +181,27 @@
         return UIHelper.activateAt(x, y);
     }
 
+    static activateElementAtHumanSpeed(element)
+    {
+        const x = element.offsetLeft + element.offsetWidth / 2;
+        const y = element.offsetTop + element.offsetHeight / 2;
+
+        if (!this.isWebKit2() || !this.isIOSFamily()) {
+            eventSender.mouseMoveTo(x, y);
+            eventSender.mouseDown();
+            eventSender.mouseUp();
+            return Promise.resolve();
+        }
+
+        return new Promise(async (resolve) => {
+            await new Promise(resolveAfterDelay => setTimeout(resolveAfterDelay, 350));
+            testRunner.runUIScript(`
+                uiController.singleTapAtPoint(${x}, ${y}, function() {
+                    uiController.uiScriptComplete();
+                });`, resolve);
+        });
+    }
+
     static async doubleActivateAt(x, y)
     {
         if (this.isIOSFamily())

Modified: branches/safari-608.1-branch/LayoutTests/tests-options.json (248119 => 248120)


--- branches/safari-608.1-branch/LayoutTests/tests-options.json	2019-08-01 19:50:40 UTC (rev 248119)
+++ branches/safari-608.1-branch/LayoutTests/tests-options.json	2019-08-01 19:52:24 UTC (rev 248120)
@@ -1897,5 +1897,8 @@
     ],
     "imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-twice.html": [
         "slow"
+    ],
+    "http/tests/paymentrequest/payment-response-reference-cycle-leak.https.html": [
+        "slow"
     ]
 }
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to