Title: [249049] branches/safari-608-branch/LayoutTests
Revision
249049
Author
ryanhad...@apple.com
Date
2019-08-23 10:06:24 -0700 (Fri, 23 Aug 2019)

Log Message

Cherry-pick r249028. rdar://problem/54614691

    REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
    https://bugs.webkit.org/show_bug.cgi?id=201050

    Reviewed by Wenson Hsieh.

    * fast/events/ios/select-all-with-existing-selection.html:
    The test as-written doesn't actually wait for the tap to complete before
    continuing on with the test - it starts immediately when the focus event
    fires. This results in the selection being changed by the single click
    handler *after* focusing the field.

    Rewrite the test to await completion of the tap before moving forward
    instead of waiting for focus.

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

Modified Paths

Diff

Modified: branches/safari-608-branch/LayoutTests/ChangeLog (249048 => 249049)


--- branches/safari-608-branch/LayoutTests/ChangeLog	2019-08-23 17:06:22 UTC (rev 249048)
+++ branches/safari-608-branch/LayoutTests/ChangeLog	2019-08-23 17:06:24 UTC (rev 249049)
@@ -1,5 +1,42 @@
 2019-08-23  Ryan Haddad  <ryanhad...@apple.com>
 
+        Cherry-pick r249028. rdar://problem/54614691
+
+    REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
+    https://bugs.webkit.org/show_bug.cgi?id=201050
+    
+    Reviewed by Wenson Hsieh.
+    
+    * fast/events/ios/select-all-with-existing-selection.html:
+    The test as-written doesn't actually wait for the tap to complete before
+    continuing on with the test - it starts immediately when the focus event
+    fires. This results in the selection being changed by the single click
+    handler *after* focusing the field.
+    
+    Rewrite the test to await completion of the tap before moving forward
+    instead of waiting for focus.
+    
+    
+    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-22  Tim Horton  <timothy_hor...@apple.com>
+
+            REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
+            https://bugs.webkit.org/show_bug.cgi?id=201050
+
+            Reviewed by Wenson Hsieh.
+
+            * fast/events/ios/select-all-with-existing-selection.html:
+            The test as-written doesn't actually wait for the tap to complete before
+            continuing on with the test - it starts immediately when the focus event
+            fires. This results in the selection being changed by the single click
+            handler *after* focusing the field.
+
+            Rewrite the test to await completion of the tap before moving forward
+            instead of waiting for focus.
+
+2019-08-23  Ryan Haddad  <ryanhad...@apple.com>
+
         Cherry-pick r249017. rdar://problem/54564878
 
     Rebaseline some editing tests after r248974

Modified: branches/safari-608-branch/LayoutTests/fast/events/ios/select-all-with-existing-selection.html (249048 => 249049)


--- branches/safari-608-branch/LayoutTests/fast/events/ios/select-all-with-existing-selection.html	2019-08-23 17:06:22 UTC (rev 249048)
+++ branches/safari-608-branch/LayoutTests/fast/events/ios/select-all-with-existing-selection.html	2019-08-23 17:06:24 UTC (rev 249049)
@@ -26,20 +26,18 @@
         UIHelper.keyDown("a", ["metaKey"]);
 }
 
-function runTest()
+async function runTest()
 {
     let testElement = document.getElementById("test");
     console.assert(testElement.value.indexOf("word") !== -1);
-    function handleFocus() {
-        document.addEventListener("selectionchange", testSelectAll, { once: true });
-        testElement.setSelectionRange(testElement.value.indexOf("word"), testElement.value.length);
-    }
-    testElement.addEventListener("focus", handleFocus, { once: true });
 
     if (window.testRunner)
-        UIHelper.activateElement(testElement);
+        await UIHelper.activateElement(testElement);
     else
         testElement.focus();
+
+    document.addEventListener("selectionchange", testSelectAll, { once: true });
+    testElement.setSelectionRange(testElement.value.indexOf("word"), testElement.value.length);
 }
 
 description("This tests that pressing Command + A selects all the text even when there is an existing range selction. To run this test by hand, press Command + A.");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to