| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>This tests typing a character after input event handler modified values of textarea. WebKit should not crash and you should see PASS below:</p> |
| <form><textarea oninput="this.value == 'ab' ? this.value = '' : null">a</textarea></form> |
| <script> |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var text = document.forms[0].elements[0]; |
| text.focus(); |
| text.setSelectionRange(text.value.length, text.value.length); |
| document.execCommand('InsertText', false, 'b'); |
| document.execCommand('InsertText', false, 'c'); |
| document.write(text.value == 'c' ? 'PASS' : 'FAIL'); |
| |
| </script> |
| </body> |
| </html> |