tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / platform / mac / accessibility / aria-table-with-colspan-cells.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <table tabindex="0" id="grid" role="grid" class="am" aria-label="Morning schedule">
9 <tr role="row"><th colspan="3" aria-label="ColspanCell">Fremont</th></tr>
10 <tr role="row"><td role="columnheader">Leaves</td><td role="columnheader">Arrives</td><td role="columnheader">Route</td></tr>
11 <tr role="row"><td aria-label="BART at">7:00 AM</td><td>8:00 AM</td><td aria-label="RowspanCell" rowspan="3">FB1</td></tr>
12 <tr role="row"><td aria-label="BART at">7:00 AM</td><td>8:00 AM</td></tr>
13 <tr role="row"><td aria-label="BART at">7:00 AM</td><td>8:00 AM</td></tr>
14 </table>
15
16 <p id="description"></p>
17 <div id="console"></div>
18
19 <script>
20
21     description("This tests if an ARIA grid has a table cell with colspans, then cellForRowAndColumn still returns the correct cell.");
22
23     if (window.accessibilityController) {
24
25         document.getElementById("grid").focus();
26         var grid = accessibilityController.focusedElement;
27
28         shouldBe("grid.cellForColumnAndRow(2, 0).role", "'AXRole: AXCell'");
29         shouldBe("grid.cellForColumnAndRow(2, 0).description", "'AXDescription: ColspanCell'");
30
31         shouldBe("grid.cellForColumnAndRow(2, 4).role", "'AXRole: AXCell'");
32         shouldBe("grid.cellForColumnAndRow(2, 4).description", "'AXDescription: RowspanCell'");
33
34         // Verify nothing funny happens when we ask for strange values. We'll crash if something went awry.
35         for (var k = -1; k < 10; k++) {
36             for (var j = -1; j < 10; j++) {
37                 var test = grid.cellForColumnAndRow(k, j);
38             }
39         }
40     }
41
42 </script>
43
44 <script src="../../../fast/js/resources/js-test-post.js"></script>
45 </body>
46 </html>