Title: [220570] trunk/LayoutTests
Revision
220570
Author
n_w...@apple.com
Date
2017-08-10 18:41:56 -0700 (Thu, 10 Aug 2017)

Log Message

Layout test accessibility/press-target-uses-text-descendant-node.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=175272
<rdar://problem/33756962>

Since accessibilityPress is async, we shouldn't rely on the timeout.

Reviewed by Chris Fleizach.

* accessibility/press-target-uses-text-descendant-node.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (220569 => 220570)


--- trunk/LayoutTests/ChangeLog	2017-08-11 00:41:53 UTC (rev 220569)
+++ trunk/LayoutTests/ChangeLog	2017-08-11 01:41:56 UTC (rev 220570)
@@ -1,3 +1,15 @@
+2017-08-10  Nan Wang  <n_w...@apple.com>
+
+        Layout test accessibility/press-target-uses-text-descendant-node.html is flaky.
+        https://bugs.webkit.org/show_bug.cgi?id=175272
+        <rdar://problem/33756962>
+
+        Since accessibilityPress is async, we shouldn't rely on the timeout.
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/press-target-uses-text-descendant-node.html:
+
 2017-08-10  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed test gardening for High Sierra.

Modified: trunk/LayoutTests/accessibility/press-target-uses-text-descendant-node.html (220569 => 220570)


--- trunk/LayoutTests/accessibility/press-target-uses-text-descendant-node.html	2017-08-11 00:41:53 UTC (rev 220569)
+++ trunk/LayoutTests/accessibility/press-target-uses-text-descendant-node.html	2017-08-11 01:41:56 UTC (rev 220570)
@@ -38,20 +38,24 @@
 
     description("Make sure that when performing a press, we target the deepest descendant, but also one that is an Element at the least.");
 
+    document.getElementById("link").addEventListener("click", pressedLink);
+    document.getElementById("button").addEventListener("click", pressedButton);
     function startTest() {
        accessibilityController.accessibleElementById("link").press();
-       setTimeout(function() {
-           debug("\nNow pressing on button\n");
-           accessibilityController.accessibleElementById("button").press();
-           setTimeout(function() {
-               finishJSTest();
-           }, 10);
-       }, 10);
     }
 
     if (window.accessibilityController) {
        window.jsTestIsAsync = true;
     }
+    
+    function pressedLink() {
+        debug("\nNow pressing on button\n");
+        accessibilityController.accessibleElementById("button").press();
+    }
+    
+    function pressedButton() {
+        finishJSTest();
+    }
 
 </script>
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to