1 <!-- This test was made after noticing that all th elements in the table were included in the columnHeaders,
2 and the only criterion for including a cell to rowHeaders was only scope attribute (but not th).
7 testRunner
.dumpAsText();
40 <p>This tests that the columnHeaders() and rowHeaders() functions return the correct headers for a table cell.
</p>
41 <div id=
"result"></div>
44 if (window
.accessibilityController
) {
45 var table
= accessibilityController
.accessibleElementById("table1");
46 var cell1
= table
.cellForColumnAndRow(0, 3);
47 var colHeaders1
= cell1
.columnHeaders();
48 var rowHeaders1
= cell1
.rowHeaders();
49 var cell2
= table
.cellForColumnAndRow(1, 2);
50 var colHeaders2
= cell2
.columnHeaders();
51 var rowHeaders2
= cell2
.rowHeaders();
53 result
.innerText
+= "The table cell at (0,3) should have exactly one column header, currently it has " + colHeaders1
.length
+ " column header(s).\n";
54 result
.innerText
+= "The table cell at (0,3) should have exactly 0 row headers, currently it has " + rowHeaders1
.length
+ " row header(s).\n\n";
55 result
.innerText
+= "The table cell at (1,2) should have exactly one column header, currently it has " + colHeaders2
.length
+ " column header(s).\n";
56 result
.innerText
+= "The table cell at (1,2) should have exactly one row header, currently it has " + rowHeaders2
.length
+ " row header(s).\n\n";