OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p>This tests forward-deleting a character after input event handler modified va
lues of textarea. WebKit should not crash and you should see PASS below:</p> | 4 <p>This tests forward-deleting a character after input event handler modified va
lues of textarea. WebKit should not crash and you should see PASS below:</p> |
5 <form><textarea oninput="this.value != 'b' ? this.value = 'b' : null">a</textare
a></form> | 5 <form><textarea oninput="this.value != 'b' ? this.value = 'b' : null">a</textare
a></form> |
6 <script> | 6 <script> |
7 | 7 |
8 if (window.layoutTestController) | 8 if (window.layoutTestController) |
9 layoutTestController.dumpAsText(); | 9 layoutTestController.dumpAsText(); |
10 | 10 |
11 var text = document.forms[0].elements[0]; | 11 var text = document.forms[0].elements[0]; |
12 text.focus(); | 12 text.focus(); |
13 text.setSelectionRange(text.value.length, text.value.length); | 13 text.setSelectionRange(text.value.length, text.value.length); |
14 document.execCommand('InsertLineBreak', false, null); | 14 document.execCommand('InsertLineBreak', false, null); |
15 document.execCommand('ForwardDelete', false, null); | 15 document.execCommand('ForwardDelete', false, null); |
16 document.write(text.value == 'b' ? 'PASS' : 'FAIL'); | 16 document.write(text.value == 'b' ? 'PASS' : 'FAIL'); |
17 | 17 |
18 </script> | 18 </script> |
19 </body> | 19 </body> |
20 </html> | 20 </html> |
OLD | NEW |