JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / element-level.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 <blockquote>
9     blockquote level 1
10     <blockquote>
11         blockquote level 2
12     </blockquote>
13 </blockquote>
14
15 <h1>heading level 1</h1>
16 <h2>heading level 2</h2>
17
18 <!-- Table headings and bodies are included so these tables are identified as accessibility tables. -->
19 <table>
20     <thead><tr><td>table heading level 1</td></tr></thead>
21     <tbody><tr><td><table>
22         <thead><tr><td>table heading level 2</td></tr></thead>
23         <tbody><tr><td>table body level 2</td></tr></tbody>
24     </table></td></tr></tbody>
25 </table>
26
27 <p id="description"></p>
28 <div id="console"></div>
29
30 <script>
31     description("This tests elements' accessibility level value.");
32     
33     if (window.accessibilityController) {
34         document.getElementById("body").focus();
35         var body = accessibilityController.focusedElement;
36         
37         // Blockquote levels.
38         shouldBe("body.childAtIndex(0).childAtIndex(0).numberAttributeValue('AXBlockQuoteLevel')", "1");
39         shouldBe("body.childAtIndex(1).childAtIndex(0).numberAttributeValue('AXBlockQuoteLevel')", "2");
40         // Non-blockquotes should return a blockquote level of 0.
41         shouldBe("body.childAtIndex(2).numberAttributeValue('AXBlockQuoteLevel')", "0");
42         
43         // Heading levels.
44         shouldBe("body.childAtIndex(2).numberAttributeValue('AXValue')", "1");
45         shouldBe("body.childAtIndex(3).numberAttributeValue('AXValue')", "2");
46         // Heading level is explicitly specified using a unique HTML tag and is not simply an attribute any element may have.
47         // Therefore, non-headings do not have a heading level that must be checked.
48         
49         // Table levels.
50         shouldBe("body.childAtIndex(4).numberAttributeValue('AXTableLevel')", "1");
51         shouldBe("body.childAtIndex(4).childAtIndex(1).childAtIndex(0).childAtIndex(0).numberAttributeValue('AXTableLevel')", "2");
52         // Non-tables should return a table level of 0.
53         shouldBe("body.childAtIndex(0).numberAttributeValue('AXTableLevel')", "0");
54     }
55     
56 </script>
57
58 <script src="../../../fast/js/resources/js-test-post.js"></script>
59 </body>
60 </html>