Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / table-column-headers-with-captions.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../resources/js-test-pre.js"></script>
6 </head>
7 <body id="body">
8
9 <table id="table" width="100%" border="0" cellspacing="2" cellpadding="1">
10     <caption>caption</caption>
11     <colgroup width="100%" span="2"><col width="50%"><col width="50%"></colgroup>
12     <tbody>
13         <tr><th>header1</th><th>header2</th></tr>
14         <tr><td>a</td><td>b</td></tr>
15     </tbody>
16 </table>
17
18 <p id="description"></p>
19 <div id="console"></div>
20
21 <script>
22
23     description("This tests that a table with a caption and an empty colgroup will still correctly report its headers.");
24
25     if (window.accessibilityController) {
26
27         var table = accessibilityController.accessibleElementById("table");
28         var colHeaders = table.columnHeaders();
29         if (accessibilityController.platformName == "atk") {
30             shouldBeTrue("colHeaders[0].isEqual(table.cellForColumnAndRow(0,0))");
31             shouldBeTrue("colHeaders[1].isEqual(table.cellForColumnAndRow(1,0))");
32         } else {
33             shouldBeTrue("colHeaders[0].isEqual(table.rowAtIndex(0).childAtIndex(0))");
34             shouldBeTrue("colHeaders[1].isEqual(table.rowAtIndex(0).childAtIndex(1))");
35         }
36     }
37
38 </script>
39
40 <script src="../resources/js-test-post.js"></script>
41 </body>
42 </html>