blob: 95ff108aedf8c3a88a734018e578e2acc3fb3640 [file] [log] [blame]
<div id="description">This tests for a bug where adding content to the end of a fragment that ends with an interchange newline and inserting it would create an extraneous newline at the *start* of pasted content. Below you should see two paragraphs of text followed by two empty paragraphs.</div>
<div id="edit" contentEditable="true"></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
edit = document.getElementById("edit");
window.getSelection().collapse(edit, 0);
document.execCommand("InsertHTML", false, "<div>Paragraph one</div><div>Paragraph two</div><br class='Apple-interchange-newline'><div><br></div>");
if (window.testRunner)
document.body.innerText = document.getElementById("description").innerText + "\n\n" + edit.innerHTML;
</script>