blob: 1c13b85af78a9ae553642c8c88ef1c6a0dccacb2 [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.<br /><font color='#00cc00'>This sentence is green.</font><br />This one is not.
<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, 53)", "'Hello world.\\nThis sentence is green.\\nThis one is not.'");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>