Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / 8145-2.html
blob0b2b8093f0716f515596e4bcd6c9bc0853dfd64f
1 <script>
2 if (window.testRunner)
3 testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests a change made with the fix for 8145. The paragraph separator inserted to prevent nesting blocks from the fragment to paste inside the block where the paste occured was incorrectly inserted when the paste occured at the start of a paragraph.</p>
6 <div id="test" style="border: 1px solid black;" contenteditable="true"></div>
8 <script>
9 if (window.internals)
10 internals.settings.setEditingBehavior('mac');
11 var s = window.getSelection();
12 var p = document.getElementById("test");
13 p.innerHTML = "foo<br>bar<br>baz";
14 s.collapse(p, 0);
15 s.modify("move", "forward", "word");
16 s.modify("move", "forward", "character");
17 var html = "<div>foo</div>bar";
18 document.execCommand("InsertHTML", false, html);
19 </script>