Title: [251486] trunk/LayoutTests
- Revision
- 251486
- Author
- [email protected]
- Date
- 2019-10-23 12:13:36 -0700 (Wed, 23 Oct 2019)
Log Message
fast/forms/ios/click-should-not-suppress-misspelling.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=203283
<rdar://problem/52701047>
Reviewed by Tim Horton.
This layout test frequently fails on iOS 13, because it assumes that the `selectionchange` event due to tapping
a misspelled word must occur within one zero-delay timeout after detecting a click event. However, this is not
guaranteed; to fix the test, we simply wait until both `click` and `selectionchange` events have occured, and
then check that the entire contents of the text field are selected.
* 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 (251485 => 251486)
--- trunk/LayoutTests/ChangeLog 2019-10-23 19:09:04 UTC (rev 251485)
+++ trunk/LayoutTests/ChangeLog 2019-10-23 19:13:36 UTC (rev 251486)
@@ -1,3 +1,19 @@
+2019-10-23 Wenson Hsieh <[email protected]>
+
+ fast/forms/ios/click-should-not-suppress-misspelling.html is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=203283
+ <rdar://problem/52701047>
+
+ Reviewed by Tim Horton.
+
+ This layout test frequently fails on iOS 13, because it assumes that the `selectionchange` event due to tapping
+ a misspelled word must occur within one zero-delay timeout after detecting a click event. However, this is not
+ guaranteed; to fix the test, we simply wait until both `click` and `selectionchange` events have occured, and
+ then check that the entire contents of the text field are selected.
+
+ * fast/forms/ios/click-should-not-suppress-misspelling-expected.txt:
+ * fast/forms/ios/click-should-not-suppress-misspelling.html:
+
2019-10-23 Yury Semikhatsky <[email protected]>
Web Inspector: frontend tests should clear output before resending results
Modified: trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling-expected.txt (251485 => 251486)
--- trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling-expected.txt 2019-10-23 19:09:04 UTC (rev 251485)
+++ trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling-expected.txt 2019-10-23 19:13:36 UTC (rev 251486)
@@ -3,6 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS clicked && selectionChanged became true
PASS input.selectionStart is 0
PASS input.selectionEnd is 7
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling.html (251485 => 251486)
--- trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling.html 2019-10-23 19:09:04 UTC (rev 251485)
+++ trunk/LayoutTests/fast/forms/ios/click-should-not-suppress-misspelling.html 2019-10-23 19:13:36 UTC (rev 251486)
@@ -21,6 +21,8 @@
<script>
const input = document.getElementById("input");
jsTestIsAsync = true;
+clicked = false;
+selectionChanged = false;
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 " +
@@ -30,15 +32,15 @@
(async function() {
await UIHelper.activateAndWaitForInputSessionAt(100, 200);
- input.addEventListener("click", () => {
- setTimeout(() => {
- shouldBe("input.selectionStart", "0");
- shouldBe("input.selectionEnd", "7");
- finishJSTest();
- });
+ input.addEventListener("click", () => clicked = true);
+ document.addEventListener("selectionchange", () => selectionChanged = true);
+
+ await UIHelper.tapAt(300, 200);
+ shouldBecomeEqual("clicked && selectionChanged", "true", () => {
+ shouldBe("input.selectionStart", "0");
+ shouldBe("input.selectionEnd", "7");
+ finishJSTest();
});
-
- UIHelper.tapAt(800, 200);
})();
</script>
</body>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes