Clean up asynchronous behavior in some accessibility tests
[WebKit-https.git] / LayoutTests / accessibility / mac / setting-attributes-is-asynchronous.html
1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <script src="../../resources/js-test-pre.js"></script>
5
6 <input type="text" id="textfield" onfocus="debug('This line should be printed second.');  finishJSTest(); ">
7
8 <div id="description"></div>
9 <div id="console"></div>
10
11 <script>
12
13 description("This tests makes sure that setting accessibility attributes happens asychronously, so that a caller won't hang if the result is an alert.")
14
15 if (window.testRunner && window.accessibilityController) {
16    window.jsTestIsAsync = true;
17    var textfield = accessibilityController.accessibleElementById("textfield");
18    textfield.takeFocus();
19    debug("This line should be printed first");
20 } else
21    debug((window.testRunner ? "window.testRunner" : "window.accessibilityController") + " is not present");
22
23 </script>
24 <script src="../../resources/js-test-post.js"></script>
25 </body>
26 </html>