Title: [234449] trunk/LayoutTests
Revision
234449
Author
[email protected]
Date
2018-07-31 22:21:27 -0700 (Tue, 31 Jul 2018)

Log Message

Tidy up a layout test introduced in r234436.
https://bugs.webkit.org/show_bug.cgi?id=188107
<rdar://problem/42354250>

Reviewed by Daniel Bates.

The expected output of a test that uses js-test.js should include a description, plus a line that states that
there will be a series of PASS messages, PASS/FAIL output, a successfully parsed line and finally a TEST
COMPLETE line. This patch adjusts a newly introduced test to follow this convention.

* fast/forms/ios/click-should-not-suppress-misspelling-expected.txt:
* fast/forms/ios/click-should-not-suppress-misspelling.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (234448 => 234449)


--- trunk/LayoutTests/ChangeLog	2018-08-01 05:11:38 UTC (rev 234448)
+++ trunk/LayoutTests/ChangeLog	2018-08-01 05:21:27 UTC (rev 234449)
@@ -1,3 +1,18 @@
+2018-07-31  Wenson Hsieh  <[email protected]>
+
+        Tidy up a layout test introduced in r234436.
+        https://bugs.webkit.org/show_bug.cgi?id=188107
+        <rdar://problem/42354250>
+
+        Reviewed by Daniel Bates.
+
+        The expected output of a test that uses js-test.js should include a description, plus a line that states that
+        there will be a series of PASS messages, PASS/FAIL output, a successfully parsed line and finally a TEST
+        COMPLETE line. This patch adjusts a newly introduced test to follow this convention.
+
+        * fast/forms/ios/click-should-not-suppress-misspelling-expected.txt:
+        * fast/forms/ios/click-should-not-suppress-misspelling.html:
+
 2018-07-31  Ryan Haddad  <[email protected]>
 
         Layout Test svg/animations/smil-leak-element-instances-noBaseValRef.svg is flaky

Modified: trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling-expected.txt (234448 => 234449)


--- trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling-expected.txt	2018-08-01 05:11:38 UTC (rev 234448)
+++ trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling-expected.txt	2018-08-01 05:21:27 UTC (rev 234449)
@@ -1,6 +1,11 @@
-PASS successfullyParsed is true
+This test verifies that tapping in a misspelled word selects the misspelled word, and does not cause the selection to collapse after a click event is dispatched. To manually test, tap the input field to bring up the keyboard, and then tap on a part of the word in the input field that is far away from the editing caret. As a result, the contents of the input should be selected and marked as a misspelled word.
 
-TEST COMPLETE
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 PASS input.selectionStart is 0
 PASS input.selectionEnd is 7
+PASS successfullyParsed is true
 
+TEST COMPLETE
+

Modified: trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling.html (234448 => 234449)


--- trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling.html	2018-08-01 05:11:38 UTC (rev 234448)
+++ trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling.html	2018-08-01 05:21:27 UTC (rev 234449)
@@ -18,32 +18,28 @@
 </head>
 <body>
 <input id="input" value="covfefe">
-</body>
 <script>
 const input = document.getElementById("input");
+jsTestIsAsync = true;
 
-addEventListener("load", async () => {
-    if (window.testRunner) {
-        testRunner.dumpAsText();
-        testRunner.waitUntilDone();
-    } else {
-        description(`To manually test, tap the input field to bring up the keyboard, and then tap on a part of the word in
-            the input field that is far away from the editing caret. As a result, the contents of the input should be
-            selected and marked as a misspelled word.`);
-        return;
-    }
+description("This test verifies that tapping in a misspelled word selects the misspelled word, and does not cause " +
+    "the selection to collapse after a click event is dispatched. To manually test, tap the input field to bring up " +
+    "the keyboard, and then tap on a part of the word in the input field that is far away from the editing caret. As " +
+    "a result, the contents of the input should be selected and marked as a misspelled word.");
 
-    await UIHelper.activateAndWaitForInputSessionAt(100, 150);
+(async function() {
+    await UIHelper.activateAndWaitForInputSessionAt(100, 200);
 
     input.addEventListener("click", () => {
         setTimeout(() => {
             shouldBe("input.selectionStart", "0");
             shouldBe("input.selectionEnd", "7");
-            testRunner.notifyDone();
+            finishJSTest();
         });
     });
 
-    await UIHelper.tapAt(800, 150);
-});
+    UIHelper.tapAt(800, 200);
+})();
 </script>
+</body>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to