blob: 25f816d354d74becbac142e4f0b368ba49206e0e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<p id="content">This is a test.</p>Hello world.
<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 paragraph = webArea.childAtIndex(0);
var block = webArea.childAtIndex(1);
shouldBe("paragraph.stringForRange(0, -1)", "'This is a test.'");
shouldBe("block.stringForRange(0, 12)", "'Hello world.'");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>