Title: [229118] trunk/LayoutTests
Revision
229118
Author
n_w...@apple.com
Date
2018-02-28 18:15:23 -0800 (Wed, 28 Feb 2018)

Log Message

Layout Test accessibility/mac/accessibility-make-first-responder.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=183232

Reviewed by Chris Fleizach.

The test is flaky because that the UIProcess might have received the IPC message
to set the first responder after we check the current state. Added a delay
in the test to fix that.

* accessibility/mac/accessibility-make-first-responder.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (229117 => 229118)


--- trunk/LayoutTests/ChangeLog	2018-03-01 02:12:31 UTC (rev 229117)
+++ trunk/LayoutTests/ChangeLog	2018-03-01 02:15:23 UTC (rev 229118)
@@ -1,5 +1,18 @@
 2018-02-28  Nan Wang  <n_w...@apple.com>
 
+        Layout Test accessibility/mac/accessibility-make-first-responder.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=183232
+
+        Reviewed by Chris Fleizach.
+
+        The test is flaky because that the UIProcess might have received the IPC message
+        to set the first responder after we check the current state. Added a delay 
+        in the test to fix that.
+
+        * accessibility/mac/accessibility-make-first-responder.html:
+
+2018-02-28  Nan Wang  <n_w...@apple.com>
+
         AX: AOM: Dispatch accessiblesetvalue event
         https://bugs.webkit.org/show_bug.cgi?id=183021
         <rdar://problem/37764242>

Modified: trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder.html (229117 => 229118)


--- trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder.html	2018-03-01 02:12:31 UTC (rev 229117)
+++ trunk/LayoutTests/accessibility/mac/accessibility-make-first-responder.html	2018-03-01 02:15:23 UTC (rev 229118)
@@ -40,12 +40,15 @@
         var input = document.getElementById("input");
         debug("DOM focus");
         input.focus();
-        testRunner.runUIScript(isWindowFirstResponderScript(), function(result) {
-            debug("Window is still the first responder: " + result);
-            input.blur();
-            // 2. Now make sure accessibility focus will make web content the first responder.
-            testAccessibilityMakeFirstResonder();
-        });
+        // Give it some delay for the IPC to happen.
+        setTimeout(function(){ 
+            testRunner.runUIScript(isWindowFirstResponderScript(), function(result) {
+                debug("Window is still the first responder: " + result);
+                input.blur();
+                // 2. Now make sure accessibility focus will make web content the first responder.
+                testAccessibilityMakeFirstResonder();
+            });
+        }, 100);
     }
     
     function testAccessibilityMakeFirstResonder() {
@@ -53,10 +56,13 @@
             var inputObj = accessibilityController.accessibleElementById("input");
             debug("Accessibility focus")
             inputObj.takeFocus();
-            testRunner.runUIScript(isWindowFirstResponderScript(), function(result) {
-                debug("Window is still the first responder: " + result);
-                finishTest();
-            });
+            // Give it some delay for the IPC to happen.
+            setTimeout(function(){ 
+                testRunner.runUIScript(isWindowFirstResponderScript(), function(result) {
+                    debug("Window is still the first responder: " + result);
+                    finishTest();
+                });
+            }, 100);
         }
     }
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to