Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / table-cell-display-block.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div id="content">
9
10 <table border=1 id="table1">
11   <tr><td id="cell1" style="display:block;">a1</td><td>b1</td><td>c1</td></tr>
12   <tr><td style="display:block;">a2</td><td>b2</td><td>c2</td></tr>
13 </table>
14
15 <table border=1 id="table2" role="group">
16   <tr><td id="cell2" style="display:block;">a1</td><td>b1</td><td>c1</td></tr>
17   <tr><td style="display:block;">a2</td><td>b2</td><td>c2</td></tr>
18 </table>
19
20 </div>
21 <p id="description"></p>
22 <div id="console"></div>
23 <script>
24
25     description("This tests that if a table cell uses display:block, the table cell will still be accessible");
26
27     if (window.accessibilityController) {
28         var table = accessibilityController.accessibleElementById("table1");
29         var cell1a = table.cellForColumnAndRow(0, 0);
30         var cell1b = table.childAtIndex(0).childAtIndex(0);
31
32         shouldBeTrue("cell1a.isEqual(cell1b)");
33         shouldBe("cell1a.role", "'AXRole: AXCell'");
34         
35         var domCell1 = document.getElementById("cell1");
36         shouldBe("domCell1.style.display", "'block'");
37
38         // Now check a table that uses a different role to make sure we don't have any cell roles.
39         var table2 = accessibilityController.accessibleElementById("table2");
40         shouldBe("table2.role", "'AXRole: AXGroup'");
41         var cell2 = table2.childAtIndex(0).childAtIndex(0);
42         shouldBeFalse("cell2.role == 'AXRole: AXCell'");
43
44         document.getElementById("content").style.visibility = "hidden";
45     }
46
47 </script>
48
49 <script src="../resources/js-test-post.js"></script>
50 </body>
51 </html>