Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / table-hierarchy.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 <script>
6     function dumpAccessibilityChildren(element, level) {
7         if (element.stringValue.indexOf('End of test') >= 0)
8             return false;
9
10         var indent = "";
11         for (var k = 0; k < level; k++) { indent += "  "; }
12         debug(indent + element.role + " " + element.stringValue);
13         var childrenCount = element.childrenCount;
14         for (var k = 0; k < childrenCount; k++) {
15             if (!dumpAccessibilityChildren(element.childAtIndex(k), level+1))
16                 return false;
17         }
18         return true;
19     }
20 </script>
21 </head>
22 <body id="body">
23 <table>
24 <tr><td>foo</td><td>bar</td></tr>
25 </table>
26 <table>
27 <tr><th>Odd</th><th>Even</th></tr>
28 <tr><td>1</td><td>2</td></tr>
29 <tr><td>3</td><td>4</td></tr>
30 </table>
31 <table>
32 <tbody>
33 <tr><td>hello</td><td>world</td></tr>
34 </tbody>
35 </table>
36 <table border=1>
37 <tr><th>Odd</th><th>Even</th></tr>
38 <tr><td><p>1</p></td><td><p>2</p></td></tr>
39 <tr><td><p>3</p></td><td><p>4</p></td></tr>
40 </table>
41 <div>End of test</div>
42 <p id="description"></p>
43 <div id="console"></div>
44 <script>
45     description("This tests the accessible hierarchy for an HTML table.");
46     if (window.accessibilityController) {
47       document.getElementById("body").focus();
48       dumpAccessibilityChildren(accessibilityController.focusedElement, 0);
49     }
50 </script>
51 <script src="../resources/js-test-post.js"></script>
52 </body>
53 </html>