blob: 977928fdfb6bf8ca7c42802daf2c12e4129dc593 [file] [log] [blame]
<html>
<script src="../resources/js-test-pre.js"></script>
<body>
<div id="result"></div>
<textarea name="area1" id="area1" rows="5" cols="40">
line 1
line 2
line 3
</textarea>
<script>
if (window.accessibilityController) {
window.jsTestIsAsync = true;
var area1 = document.getElementById("area1");
area1.focus();
setTimeout(function() {
var textArea = accessibilityController.focusedElement;
textArea.setSelectedTextRange(4, 0);
// After setting a property through accessibility, the value won't be updated immediately, so we
// must check after a timeout to re-verify the value.
setTimeout(function() {
debug(textArea.selectedTextRange);
textArea.setSelectedTextRange(8,2);
setTimeout(function() {
debug(textArea.selectedTextRange);
textArea.setSelectedTextRange(100,0);
setTimeout(function() {
debug(textArea.selectedTextRange);
finishJSTest();
}, 0);
}, 0);
}, 0);
}, 0);
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>