blob: 579ef8dfb876180a98b87eca9f5085eca1ab94d3 [file] [log] [blame]
<html>
<head>
<script src="../../editing/editing.js" language="JavaScript" type="text/JavaScript" ></script>
<script>
function test() {
if (window.testRunner) {
testRunner.dumpAsText();
}
document.getElementById('tf').setSelectionRange(5, 11);
deleteCommand();
if (document.getElementById('tf').value == "Test Failed") {
document.getElementById('res').innerHTML = "Failed";
} else {
document.getElementById('res').innerHTML = "Passed";
}
}
</script>
</head>
<body onload="test()">
<p>This tests that calling setSelectionRange on a text field will correctly close the typing command. If the test fails, the deleteCommand that
happens after the setSelectionRange will fail, and the text field will say "Test Failed".</p>
<input id="tf" value="Test Failed"></input>
<div id="res"></div>
</body>
</html>