JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / element-focus.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <a href="#">link</a><br>
9
10 <div role="text" aria-label="text" tabindex=0>text</div>
11
12 <div role="alertdialog" tabindex="0">foo</div>
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This tests that any element that supports focus has a writable AXFocused");
20
21     if (window.accessibilityController) {
22
23           var root = accessibilityController.rootElement;
24           var body = root.childAtIndex(0);
25
26           shouldBe("body.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXLink'");
27           shouldBe("body.childAtIndex(0).childAtIndex(0).isAttributeSettable('AXFocused')", "true");
28
29           shouldBe("body.childAtIndex(1).role", "'AXRole: AXStaticText'");
30           shouldBe("body.childAtIndex(1).isAttributeSettable('AXFocused')", "true");
31
32           shouldBe("body.childAtIndex(2).role", "'AXRole: AXGroup'");
33           shouldBe("body.childAtIndex(2).isAttributeSettable('AXFocused')", "true");
34     }
35
36 </script>
37
38 <script src="../../../fast/js/resources/js-test-post.js"></script>
39 </body>
40 </html>