| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| <td><a href='foo'><span style='display:block;'>Block span in a link in a table cell</span><span>Inline span in a link in a table cell</span></a></td> |
| <td><span style='display:block;'>Block span in a table cell</span><span>Inline span in a table cell</span></td> |
| description("This tests the ability to get element text for a specified range."); |
| if (window.accessibilityController) { |
| document.getElementById("body").focus(); |
| var webArea = accessibilityController.focusedElement; |
| var row = webArea.childAtIndex(0).childAtIndex(0); |
| var cell1 = row.childAtIndex(0); |
| var cell2 = row.childAtIndex(1); |
| var cell3 = row.childAtIndex(2); |
| var cell4 = row.childAtIndex(3); |
| shouldBe("cell1.stringForRange(0, -1)", "'a table cell'"); |
| shouldBe("cell2.stringForRange(0, -1)", "''"); |
| shouldBe("cell3.stringForRange(0, -1)", "'Block span in a link in a table cell\\nInline span in a link in a table cell'"); |
| shouldBe("cell4.stringForRange(0, -1)", "'Block span in a table cell\\nInline span in a table cell'"); |
| <script src="../../resources/js-test-post.js"></script> |