blob: 4cea2ffbb211374545604e86fec76e35897cbf57 [file] [log] [blame]
<body style="font-weight: bold;" id="div" contenteditable="true"><img src="../resources/abe.png"></body>
<script>
function partTwo() {
sel.setBaseAndExtent(body, 0, body, body.childNodes.length);
document.execCommand("Copy");
sel.setPosition(body, body.childNodes.length);
document.execCommand("Paste");
document.execCommand("Paste");
document.execCommand("InsertLineBreak");
document.execCommand("InsertText", false, "This tests for a bug where an images pasted on the same line would appear on different lines. You should see several pictures above all in the same line/paragraph.");
window.testRunner.notifyDone();
}
var body = document.body;
var sel = window.getSelection();
if (window.testRunner) {
window.testRunner.waitUntilDone();
window.setTimeout(partTwo, 200);
} else {
document.execCommand("SelectAll")
document.execCommand("InsertText", false, "This tests for a bug where an images pasted on the same line would appear on different lines. To run it manually, Undo, then select the image, Copy, put the caret after the image, then Paste twice. All three images should be in separate paragraphs.");
}
</script>