1 <script src="../../resources/dump-as-markup.js"></script>
2 <div id="copy" contenteditable="true"><div><div>foo</div>bar</div>baz</div>
3 <div id="paste" contenteditable="true">foo</div>
6 testRunner.dumpEditingCallbacks();
8 var sel = window.getSelection();
9 var e = document.getElementById("copy");
10 sel.setPosition(e, 0);
11 sel.modify("move", "forward", "word");
12 sel.modify("extend", "forward", "line");
13 sel.modify("extend", "forward", "line");
14 document.execCommand("Copy");
16 e = document.getElementById("paste");
17 sel.setPosition(e, 0);
18 sel.modify("move", "forward", "word");
19 document.execCommand("Paste");
21 Markup.description('This test ensures that createMarkup puts an interchange newline on the pasteboard for a selection ending at the end of a block. Both regions below should be visually identical.')
22 Markup.dump('copy', 'first region (bar and baz are copied)');
23 Markup.dump('paste', 'second region (bar and baz are pasted)');