Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / 4242293-1.html
blobd6f2bfa54e815aead26849da078832d347c3326f
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>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpEditingCallbacks();
7 if (window.internals)
8 internals.settings.setEditingBehavior('mac');
10 var sel = window.getSelection();
11 var e = document.getElementById("copy");
12 sel.collapse(e, 0);
13 sel.modify("move", "forward", "word");
14 sel.modify("extend", "forward", "line");
15 sel.modify("extend", "forward", "line");
16 document.execCommand("Copy");
18 e = document.getElementById("paste");
19 sel.collapse(e, 0);
20 sel.modify("move", "forward", "word");
21 document.execCommand("Paste");
23 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.')
24 Markup.dump('copy', 'first region (bar and baz are copied)');
25 Markup.dump('paste', 'second region (bar and baz are pasted)');
26 </script>