<!DOCTYPE html>
<html>
<body>
<p>This tests forward-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 != 'b' ? 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('ForwardDelete', false, null);
document.write(text.value == 'b' ? 'PASS' : 'FAIL');

</script>
</body>
</html>
