blob: 4cc44c305e24da618356fe37508e4cce9b36da94 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>This tests deleting 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 != '' ? this.value = 'b' : 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('InsertLineBreak', false, null);
document.execCommand('Delete', false, null);
document.write(text.value == '' ? 'PASS' : 'FAIL');
</script>
</body>
</html>