Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-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 <div role="grid">
24 <div role="row"><div role="gridcell">foo</div><div role="gridcell">bar</div></div>
25 </div>
26 <div role="grid">
27 <div role="row"><div role="columnheader">Odd</div><div role="columnheader">Even</div></div>
28 <div role="row"><div role="gridcell">1</div><div role="gridcell">2</div></div>
29 <div role="row"><div role="gridcell">3</div><div role="gridcell">4</div></div>
30 </div>
31 <div role="grid">
32 <div role="row"><div role="gridcell">hello</div><div role="gridcell">world</div></div>
33 </div>
34 <div role="grid">
35 <div role="row"><div role="columnheader">Odd</div><div role="columnheader">Even</div></div>
36 <div role="row"><div role="gridcell"><p>1</p></div><div role="gridcell"><p>2</p></div></div>
37 <div role="row"><div role="gridcell"><p>3</p></div><div role="gridcell"><p>4</p></div></div>
38 </div>
39 <div>End of test</div>
40 <p id="description"></p>
41 <div id="console"></div>
42 <script>
43   description("This tests the accessible hierarchy for an ARIA table.");
44   if (window.accessibilityController) {
45       document.getElementById("body").focus();
46       dumpAccessibilityChildren(accessibilityController.focusedElement, 0);
47   }
48 </script>
49 <script src="../resources/js-test-post.js"></script>
50 </body>
51 </html>