| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../editing/editing.js" language="JavaScript" type="text/JavaS
cript" ></script> | 3 <script src="../../../editing/editing.js" language="JavaScript" type="text/JavaS
cript" ></script> |
| 4 <script> | 4 <script> |
| 5 function test() { | 5 function test() { |
| 6 if (window.testRunner) { | 6 if (window.testRunner) { |
| 7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 } | 8 } |
| 9 document.getElementById('tf').setSelectionRange(5, 11); | 9 document.getElementById('tf').setSelectionRange(5, 11); |
| 10 document.getElementById('tf').focus(); |
| 10 deleteCommand(); | 11 deleteCommand(); |
| 11 if (document.getElementById('tf').value == "Test Failed") { | 12 if (document.getElementById('tf').value == "Test Failed") { |
| 12 document.getElementById('res').innerHTML = "Failed"; | 13 document.getElementById('res').innerHTML = "Failed"; |
| 13 } else { | 14 } else { |
| 14 document.getElementById('res').innerHTML = "Passed"; | 15 document.getElementById('res').innerHTML = "Passed"; |
| 15 } | 16 } |
| 16 } | 17 } |
| 17 </script> | 18 </script> |
| 18 </head> | 19 </head> |
| 19 <body onload="test()"> | 20 <body onload="test()"> |
| 20 <p>This tests that calling setSelectionRange on a text field will correctly clos
e the typing command. If the test fails, the deleteCommand that | 21 <p>This tests that calling setSelectionRange on a text field will correctly clos
e the typing command. If the test fails, the deleteCommand that |
| 21 happens after the setSelectionRange will fail, and the text field will say "Test
Failed".</p> | 22 happens after the setSelectionRange will fail, and the text field will say "Test
Failed".</p> |
| 22 <input id="tf" value="Test Failed"></input> | 23 <input id="tf" value="Test Failed"></input> |
| 23 <div id="res"></div> | 24 <div id="res"></div> |
| 24 </body> | 25 </body> |
| 25 </html> | 26 </html> |
| OLD | NEW |