Skip to content

Commit

Permalink
Merge r220570 - Layout test accessibility/press-target-uses-text-desc…
Browse files Browse the repository at this point in the history
…endant-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:
  • Loading branch information
Nan Wang authored and carlosgcampos committed Aug 14, 2017
1 parent d6210b2 commit 14c2771
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
12 changes: 12 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
2017-08-10 Nan Wang <n_wang@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 Nan Wang <n_wang@apple.com>

AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
Expand Down
Expand Up @@ -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>

Expand Down

0 comments on commit 14c2771

Please sign in to comment.