OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p>This tests typing a character after input event handler modified values of te
xtarea. WebKit should not crash and you should see PASS below:</p> | 4 <p>This tests typing a character after input event handler modified values of te
xtarea. WebKit should not crash and you should see PASS below:</p> |
5 <form><textarea oninput="this.value == 'ab' ? this.value = '' : null">a</textare
a></form> | 5 <form><textarea oninput="this.value == 'ab' ? this.value = '' : 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('InsertText', false, 'b'); | 14 document.execCommand('InsertText', false, 'b'); |
15 document.execCommand('InsertText', false, 'c'); | 15 document.execCommand('InsertText', false, 'c'); |
16 document.write(text.value == 'c' ? 'PASS' : 'FAIL'); | 16 document.write(text.value == 'c' ? 'PASS' : 'FAIL'); |
17 | 17 |
18 </script> | 18 </script> |
19 </body> | 19 </body> |
20 </html> | 20 </html> |
OLD | NEW |