| <html> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| </script> |
| <body id="body"> |
| |
| <!-- Test image map --> |
| <table id="testTable" align="center" border="1" cellpadding="5" cellspacing="0"> |
| <tr> |
| <td class="center" colspan="2" rowspan="2" width="50%">Cell A<br> |
| COLSPAN="2"<br> ROWSPAN="2"</td> |
| |
| <td class="center" colspan="2">Cell B<br> COLSPAN="2"</td> |
| </tr> |
| <tr> |
| <td class="center">2,3</td> |
| <td class="center">2,4</td> |
| </tr> |
| |
| <tr class="center"> |
| <td class="center" rowspan="2">Cell C<br> ROWSPAN="2"</td> |
| <td class="center" width="25%">3,2</td> |
| <td class="center">3,3</td> |
| <td class="center">3,4</td> |
| </tr> |
| |
| <tr> |
| <td class="center">4,2</td> |
| <td class="center">4,3</td> |
| <td class="center">4,4</td> |
| </tr> |
| </table> |
| |
| <div id="result"></div> |
| |
| |
| <script> |
| if (window.accessibilityController) { |
| var result = document.getElementById("result"); |
| |
| var body = document.getElementById("body"); |
| body.focus(); |
| var table = accessibilityController.focusedElement.childAtIndex(0); |
| |
| var cell = table.cellForColumnAndRow(0,0); |
| result.innerText += "----------------------\n"; |
| result.innerText += "{ 0, 0 }\n"; |
| result.innerText += cell.allAttributes() + "\n"; |
| result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange() + "\n\n"; |
| |
| var cell = table.cellForColumnAndRow(1,1); |
| result.innerText += "----------------------\n"; |
| result.innerText += "{ 1, 1 }\n"; |
| result.innerText += cell.allAttributes() + "\n"; |
| result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange() + "\n\n"; |
| |
| var cell = table.cellForColumnAndRow(0,3); |
| result.innerText += "----------------------\n"; |
| result.innerText += "{ 3, 0 }\n"; |
| result.innerText += cell.allAttributes() + "\n"; |
| result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange() + "\n\n"; |
| |
| cell = table.cellForColumnAndRow(0,2); |
| result.innerText += "----------------------\n"; |
| result.innerText += "{ 2, 0 }\n"; |
| result.innerText += cell.allAttributes() + "\n"; |
| result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange() + "\n\n"; |
| |
| cell = table.cellForColumnAndRow(3,2); |
| result.innerText += "----------------------\n"; |
| result.innerText += "{ 2, 3 }\n"; |
| result.innerText += cell.allAttributes() + "\n"; |
| result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange() + "\n\n"; |
| |
| cell = table.cellForColumnAndRow(10,10); |
| result.innerText += "----------------------\n"; |
| result.innerText += "{ 10, 10 }\n"; |
| result.innerText += (cell != null ? cell.allAttributes() : "") + "\n"; |
| result.innerText += cell != null ? cell.rowIndexRange() : "{0, 0}"; |
| result.innerText += ", " + (cell != null ? cell.columnIndexRange() : "{0, 0}") + "\n\n"; |
| } |
| </script> |
| </body> |
| </html> |