Title: [251741] trunk/LayoutTests
Revision
251741
Author
[email protected]
Date
2019-10-29 16:04:41 -0700 (Tue, 29 Oct 2019)

Log Message

Update autocorrect test to have correctly focused contenteditable
https://bugs.webkit.org/show_bug.cgi?id=203552
<rdar://problem/51690426>

Reviewed by Wenson Hsieh.

Autocorrection bails when we are not first responder after
https://bugs.webkit.org/show_bug.cgi?id=192824
Therefore, this test must be written to first focus the
contenteditable, and then apply the autocorrection.

* fast/events/ios/autocorrect-with-range-selection.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251740 => 251741)


--- trunk/LayoutTests/ChangeLog	2019-10-29 22:33:42 UTC (rev 251740)
+++ trunk/LayoutTests/ChangeLog	2019-10-29 23:04:41 UTC (rev 251741)
@@ -1,3 +1,18 @@
+2019-10-29  Megan Gardner  <[email protected]>
+
+        Update autocorrect test to have correctly focused contenteditable
+        https://bugs.webkit.org/show_bug.cgi?id=203552
+        <rdar://problem/51690426>
+
+        Reviewed by Wenson Hsieh.
+
+        Autocorrection bails when we are not first responder after 
+        https://bugs.webkit.org/show_bug.cgi?id=192824
+        Therefore, this test must be written to first focus the 
+        contenteditable, and then apply the autocorrection.
+
+        * fast/events/ios/autocorrect-with-range-selection.html:
+
 2019-10-07  Jer Noble  <[email protected]>
 
         Implement the Remote Playback API.

Modified: trunk/LayoutTests/fast/events/ios/autocorrect-with-range-selection.html (251740 => 251741)


--- trunk/LayoutTests/fast/events/ios/autocorrect-with-range-selection.html	2019-10-29 22:33:42 UTC (rev 251740)
+++ trunk/LayoutTests/fast/events/ios/autocorrect-with-range-selection.html	2019-10-29 23:04:41 UTC (rev 251741)
@@ -2,6 +2,7 @@
 <html>
 <head>
     <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
+    <script src=""
     <script>
         if (window.testRunner) {
             testRunner.dumpAsText();
@@ -8,22 +9,19 @@
             testRunner.waitUntilDone();
         }
 
-        function runTest()
+        async function runTest()
         {
             if (!window.testRunner || !testRunner.runUIScript)
                 return;
 
             var inputEl = document.getElementById("editable");
+            await UIHelper.activateElementAndWaitForInputSession(inputEl);
             window.getSelection().setBaseAndExtent(inputEl, 0, inputEl, 2);
+            await UIHelper.applyAutocorrection("To", "Ti");
+            testRunner.notifyDone();
+        }
 
-            testRunner.runUIScript(`(function() {
-                uiController.applyAutocorrection("To", "Ti", function() {
-                    uiController.uiScriptComplete();
-                });
-            })();`, function () {
-                testRunner.notifyDone()
-            });
-        }
+        window.addEventListener('load', runTest, false);
     </script>
 </head>
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to