Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-grid-column-span.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <style>
7 div[role=grid] {
8     display: table;
9 }
10 div[role=row] {
11     display: table-row;
12 }
13 div[role=gridcell], div[role=rowheader] {
14     padding: 1em;
15     display:table-cell;
16 }
17 </style>
18 <body id="body">
19
20 <div role="grid">
21 <div role="row">
22 <div role="rowheader">Month</div>
23 <div role="gridcell" id="cell1" aria-colspan="2">Jan</div>
24 <div role="gridcell" id="cell2">Mar</div>
25 </div>
26 <div role="row">
27 <div role="rowheader">Expenses</div>
28 <div role="gridcell">100</div>
29 <div role="gridcell" id="cell3">130</div>
30 <div role="gridcell">90</div>
31 </div>
32 </div>
33
34 <p id="description"></p>
35 <div id="console"></div>
36
37 <script>
38
39     description("This tests that cells that span multiple columns within an ARIA grid have correct column index range");
40
41     if (window.accessibilityController) {
42
43           var cell1 = accessibilityController.accessibleElementById("cell1");
44           shouldBe("cell1.role", "'AXRole: AXCell'");
45           shouldBe("cell1.columnIndexRange()", "'{1, 2}'");
46
47           var cell2 = accessibilityController.accessibleElementById("cell2");
48           shouldBe("cell2.role", "'AXRole: AXCell'");
49           shouldBe("cell2.columnIndexRange()", "'{3, 1}'");
50
51           // also test cell index without column span
52           var cell3 = accessibilityController.accessibleElementById("cell3");
53           shouldBe("cell3.role", "'AXRole: AXCell'");
54           shouldBe("cell3.columnIndexRange()", "'{2, 1}'");
55     }
56 </script>
57
58 <script src="../resources/js-test-post.js"></script>
59 </body>
60 </html>