https://bugs.webkit.org/show_bug.cgi?id=148682
Reviewed by Darin Adler.
* accessibility/mac/removing-textarea-after-edit-crash-expected.txt:
* accessibility/mac/removing-textarea-after-edit-crash.html:
* accessibility/mac/select-element-selection-with-optgroups.html:
* accessibility/mac/selected-rows-table.html:
* accessibility/mac/selection-notification-focus-change.html:
* accessibility/mac/selection-sync-expected.txt:
* accessibility/mac/selection-sync.html:
* accessibility/mac/setting-attributes-is-asynchronous.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189221
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-09-01 Alexey Proskuryakov <ap@apple.com>
+
+ Clean up asynchronous behavior in some accessibility tests
+ https://bugs.webkit.org/show_bug.cgi?id=148682
+
+ Reviewed by Darin Adler.
+
+ * accessibility/mac/removing-textarea-after-edit-crash-expected.txt:
+ * accessibility/mac/removing-textarea-after-edit-crash.html:
+ * accessibility/mac/select-element-selection-with-optgroups.html:
+ * accessibility/mac/selected-rows-table.html:
+ * accessibility/mac/selection-notification-focus-change.html:
+ * accessibility/mac/selection-sync-expected.txt:
+ * accessibility/mac/selection-sync.html:
+ * accessibility/mac/setting-attributes-is-asynchronous.html:
+
2015-09-01 Dean Jackson <dino@apple.com>
The new media controls tests are OS X only.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS successfullyParsed is true
+
+TEST COMPLETE
document.getElementById("div").style.display = "NONE";
// we now have to wait for the value change to be propagated to trigger the crash.
- setTimeout("window.testRunner.notifyDone();", 1);
+ setTimeout(finishJSTest, 1);
}
}
</script>
<script>
var req = 0;
if (window.accessibilityController) {
- window.testRunner.waitUntilDone();
+ window.jsTestIsAsync = true;
document.getElementById("body").focus();
body = accessibilityController.focusedElement;
req.open("get", "../../../http/tests/xmlhttprequest/methods.cgi", true);
// Sending this after a timeout makes is so that the layout does not happen until the value change is sent.
setTimeout("req.send('')", 1);
-
- }
+ } else
+ debug("window.accessibilityController is not present");
</script>
-
+<script src="../../resources/js-test-post.js"></script>
</body>
</html>
<script>
description("This tests that setting selection within a list box works correctly if there are optgroups");
-window.jsTestIsAsync = true;
if (window.accessibilityController) {
+ window.jsTestIsAsync = true;
document.getElementById("suite").focus();
var selectElement = accessibilityController.focusedElement;
});
});
});
-}
+} else
+ debug("window.accessibilityController is not present");
</script>
<script src="../../resources/js-test-post.js"></script>
document.getElementById("notifications").innerHTML += "Notification: " + notification + "<br>";
if (notification == "AXSelectedRowsChanged") {
axTree.removeNotificationListener();
- window.testRunner.notifyDone();
+ finishJSTest();
}
}
if (window.accessibilityController) {
- window.testRunner.waitUntilDone();
+ window.jsTestIsAsync = true;
document.getElementById("grid").focus();
// Change the selected state to ensure the notification is sent.
document.getElementById("row0").setAttribute("aria-selected", "false");
- }
+ } else
+ debug("window.accessibilityController is not present");
</script>
shouldBeTrue("addedNotification");
eventSender.keyDown("\t");
+ } else {
+ debug("window.accessibilityController is not present");
+ finishJSTest();
}
}
</script>
PASS addedNotification is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
PASS results[resultIndex]["AXTextStateChangeType"] is AXTextStateChangeTypeSelectionMove
PASS results[resultIndex]["AXTextSelectionDirection"] is AXTextSelectionDirectionDiscontiguous
PASS results[resultIndex]["AXTextStateSync"] is true
PASS results[resultIndex]["AXTextStateChangeType"] is AXTextStateChangeTypeSelectionExtend
PASS results[resultIndex]["AXTextSelectionDirection"] is AXTextSelectionDirectionDiscontiguous
PASS results[resultIndex]["AXTextStateSync"] is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
shouldBe("results[resultIndex][\"AXTextStateSync\"]", "true");
webArea.removeNotificationListener();
- window.testRunner.notifyDone();
+ finishJSTest();
}
}
}
if (window.accessibilityController) {
- window.testRunner.waitUntilDone();
+ window.jsTestIsAsync = true;
accessibilityController.enableEnhancedAccessibility(true);
var extendRange = axTextbox.textMarkerRangeForMarkers(markerThree, markerFour);
webArea.setSelectedVisibleTextRange(moveRange);
webArea.setSelectedVisibleTextRange(extendRange);
- }
+ } else
+ debug("window.accessibilityController is not present");
</script>
-
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
description("This tests makes sure that setting accessibility attributes happens asychronously, so that a caller won't hang if the result is an alert.")
if (window.testRunner && window.accessibilityController) {
-
window.jsTestIsAsync = true;
var textfield = accessibilityController.accessibleElementById("textfield");
textfield.takeFocus();
debug("This line should be printed first");
-}
+} else
+ debug((window.testRunner ? "window.testRunner" : "window.accessibilityController") + " is not present");
</script>
-
<script src="../../resources/js-test-post.js"></script>
</body>
</html>