1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
7 <table id=
"table1" border=
"1">
9 <td colspan=
"10">data
</td>
10 <th scope=
"colgroup" colspan=
"5">col head
</td>a
11 <td colspan=
"2">data
</td>
14 <table id=
"table2" border=
"1">
16 <td rowspan=
"2" colspan=
"3">data
</td>
17 <th scope=
"colgroup" colspan=
"2">col head
</th>
20 <th scope=
"col">col head
</th>
21 <th scope=
"col">col head
</th>
24 <p id=
"description"></p>
25 <div id=
"console"></div>
29 description("Check whether cells with colspan are reported properly");
31 if (window
.accessibilityController
) {
32 var table1
= accessibilityController
.accessibleElementById("table1");
33 shouldBe("table1.columnCount", "3");
35 var cell_0_0
= table1
.cellForColumnAndRow(0, 0);
36 shouldBe("cell_0_0.role", "'AXRole: AXCell'");
37 shouldBe("cell_0_0.columnIndexRange()", "'{0, 1}'");
39 var cell_0_1
= table1
.cellForColumnAndRow(1, 0);
40 shouldBe("cell_0_1.role", "'AXRole: AXColumnHeader'");
41 shouldBe("cell_0_1.columnIndexRange()", "'{1, 1}'");
43 var cell_0_2
= table1
.cellForColumnAndRow(2, 0);
44 shouldBe("cell_0_2.role", "'AXRole: AXCell'");
45 shouldBe("cell_0_2.columnIndexRange()", "'{2, 1}'");
47 var table2
= accessibilityController
.accessibleElementById("table2");
48 shouldBe("table2.columnCount", "3");
49 shouldBe("table2.columnHeadersCount", "3");
51 var cell_0_1
= table2
.cellForColumnAndRow(1, 0)
52 shouldBe("cell_0_1.columnIndexRange()", "'{1, 2}'");
53 var cell_0_2
= table2
.cellForColumnAndRow(2, 0);
54 shouldBe("cell_0_2.columnIndexRange()", "'{1, 2}'");
55 shouldBeTrue("table2.columnHeaderAtIndex(0).isEqual(cell_0_1)")
56 shouldBeTrue("table2.columnHeaderAtIndex(0).isEqual(cell_0_2)");
57 shouldBeTrue("table2.columnHeaderAtIndex(1).isEqual(table2.cellForColumnAndRow(1, 1))")
58 shouldBeTrue("table2.columnHeaderAtIndex(2).isEqual(table2.cellForColumnAndRow(2, 1))");