| <script src="../../editing/editing.js" language="JavaScript" type="text/JavaScript" ></script> |
| document.getElementById('tf').setSelectionRange(5, 11); |
| if (document.getElementById('tf').value == "Test Failed") { |
| document.getElementById('res').innerHTML = "Failed"; |
| document.getElementById('res').innerHTML = "Passed"; |
| <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> |