blob: 3b1b05a77bc4974bbf02fc7c18930b7211dfd930 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<table border=1>
<tr>
<td>a table cell</td>
<td></td>
<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>
</tr>
</table>
<p id="description"></p>
<div id="console"></div>
<script>
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>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>