| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>This tests typing a character after input event handler modified values of input element. WebKit should not crash and you should see PASS below:</p> |
| <form><input type="text" oninput="this.value == 'ab' ? this.value = '' : null" value="a"></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> |