blob: 08d0cee298beb72f60ae503ceeae584bebcef2be [file] [log] [blame]
<p>This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=8250">bug 8250</a>.
The 'before text inserted' event handler wasn't being told about 'interchange newlines'.
The text field should have a space in it, followed by the word 'foo'.</p>
<p id="test result">TEST DID NOT RUN</p>
<input id="test" type="text">
<script>
if (window.testRunner)
testRunner.dumpAsText();
var e = document.getElementById("test");
e.focus();
e.setSelectionRange(0, 0);
document.execCommand("InsertHTML", false, "<br class='Apple-interchange-newline'>foo");
if (e.value === " foo")
document.getElementById("test result").innerText = "TEST PASSED";
else
document.getElementById("test result").innerText = "TEST FAILED";
</script>