1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
5 <script src="../resources/js-test-pre.js"></script>
9 <table id="table" width="100%" border="0" cellspacing="2" cellpadding="1">
10 <caption>caption</caption>
11 <colgroup width="100%" span="2"><col width="50%"><col width="50%"></colgroup>
13 <tr><th>header1</th><th>header2</th></tr>
14 <tr><td>a</td><td>b</td></tr>
18 <p id="description"></p>
19 <div id="console"></div>
23 description("This tests that a table with a caption and an empty colgroup will still correctly report its headers.");
25 if (window.accessibilityController) {
27 var table = accessibilityController.accessibleElementById("table");
28 var colHeaders = table.columnHeaders();
29 if (accessibilityController.platformName == "atk") {
30 shouldBeTrue("colHeaders[0].isEqual(table.cellForColumnAndRow(0,0))");
31 shouldBeTrue("colHeaders[1].isEqual(table.cellForColumnAndRow(1,0))");
33 shouldBeTrue("colHeaders[0].isEqual(table.rowAtIndex(0).childAtIndex(0))");
34 shouldBeTrue("colHeaders[1].isEqual(table.rowAtIndex(0).childAtIndex(1))");
40 <script src="../resources/js-test-post.js"></script>