Title: [263069] trunk/LayoutTests
Revision
263069
Author
[email protected]
Date
2020-06-15 17:20:44 -0700 (Mon, 15 Jun 2020)

Log Message

REGRESSION: [ iOS wk2 Debug ] fast/forms/call-text-did-change-in-text-field-when-typing.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=213218

Reviewed by Tim Horton.

`UIHelper.typeCharacter` is guaranteed to wait until the application in the UI process has dequeued the
synthesized key events, but is not necessarily guaranteed to wait until the web process is done handling the
key events. As a result, it's possible for this test to check the value of the text field in step (1) before the
event has been received, which causes the test to fail with a diff.

To fix this, wait for the key event to be handled (like we do for the synthetic click event below).

* fast/forms/call-text-did-change-in-text-field-when-typing-expected.txt:
* fast/forms/call-text-did-change-in-text-field-when-typing.html:
* platform/ios-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (263068 => 263069)


--- trunk/LayoutTests/ChangeLog	2020-06-16 00:10:31 UTC (rev 263068)
+++ trunk/LayoutTests/ChangeLog	2020-06-16 00:20:44 UTC (rev 263069)
@@ -1,3 +1,21 @@
+2020-06-15  Wenson Hsieh  <[email protected]>
+
+        REGRESSION: [ iOS wk2 Debug ] fast/forms/call-text-did-change-in-text-field-when-typing.html is flaky failing.
+        https://bugs.webkit.org/show_bug.cgi?id=213218
+
+        Reviewed by Tim Horton.
+
+        `UIHelper.typeCharacter` is guaranteed to wait until the application in the UI process has dequeued the
+        synthesized key events, but is not necessarily guaranteed to wait until the web process is done handling the
+        key events. As a result, it's possible for this test to check the value of the text field in step (1) before the
+        event has been received, which causes the test to fail with a diff.
+
+        To fix this, wait for the key event to be handled (like we do for the synthetic click event below).
+
+        * fast/forms/call-text-did-change-in-text-field-when-typing-expected.txt:
+        * fast/forms/call-text-did-change-in-text-field-when-typing.html:
+        * platform/ios-wk2/TestExpectations:
+
 2020-06-15  Jason Lawrence  <[email protected]>
 
         REGRESSION: [ iOS wk2 Debug ] fast/forms/call-text-did-change-in-text-field-when-typing.html is flaky failing.

Modified: trunk/LayoutTests/fast/forms/call-text-did-change-in-text-field-when-typing-expected.txt (263068 => 263069)


--- trunk/LayoutTests/fast/forms/call-text-did-change-in-text-field-when-typing-expected.txt	2020-06-16 00:10:31 UTC (rev 263068)
+++ trunk/LayoutTests/fast/forms/call-text-did-change-in-text-field-when-typing-expected.txt	2020-06-16 00:20:44 UTC (rev 263069)
@@ -5,6 +5,7 @@
 
 1. Changing text field value with user typing gesture:
 Text did change in text field.
+PASS keyPressed became true
 The value of the text field is: "a"
 
 2. Changing text field value with non-typing user gesture:

Modified: trunk/LayoutTests/fast/forms/call-text-did-change-in-text-field-when-typing.html (263068 => 263069)


--- trunk/LayoutTests/fast/forms/call-text-did-change-in-text-field-when-typing.html	2020-06-16 00:10:31 UTC (rev 263068)
+++ trunk/LayoutTests/fast/forms/call-text-did-change-in-text-field-when-typing.html	2020-06-16 00:20:44 UTC (rev 263069)
@@ -28,6 +28,7 @@
         + " injected bundle method. This test requires WebKitTestRunner.");
 
     buttonClicked = false;
+    keyPressed = false;
 
     if (window.testRunner) {
         jsTestIsAsync = true;
@@ -37,6 +38,7 @@
     field.addEventListener("keypress", event => {
         field.value += event.key;
         event.preventDefault();
+        keyPressed = true;
     });
 
     button.addEventListener("click", event => {
@@ -53,11 +55,12 @@
 
         debug("1. Changing text field value with user typing gesture:");
         await UIHelper.typeCharacter("a");
+        await new Promise(resolve => shouldBecomeEqual("keyPressed", "true", resolve));
         debug(`The value of the text field is: "${field.value}"`);
         debug("");
 
         debug("2. Changing text field value with non-typing user gesture:");
-        UIHelper.activateAt(100, 150);
+        await UIHelper.activateAt(100, 150);
         await new Promise(resolve => shouldBecomeEqual("buttonClicked", "true", resolve));
         debug(`The value of the text field is: "${field.value}"`);
         debug("");

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (263068 => 263069)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2020-06-16 00:10:31 UTC (rev 263068)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2020-06-16 00:20:44 UTC (rev 263069)
@@ -1753,5 +1753,3 @@
 webkit.org/b/212532 http/wpt/service-workers/service-worker-different-process.https.html [ Slow Pass Failure ]
 
 webkit.org/b/212696 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-no-freshness-headers.https.html [ Pass Failure ]
-
-webkit.org/b/213218 [ Debug ] fast/forms/call-text-did-change-in-text-field-when-typing.html [ Pass Failure ]
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to