Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / merge-end-list-2.html
blob30613d24803107d8c3fcab75dcefbad7c6eb938e
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This tests pasting text ('foo\nbar') into a list item. The last bit of content in the incoming fragment should be merged with the paragraph after the position being pasted into.</p>
5 <div id="test2" contenteditable="true"><ul><li><div>Item 1</div></li></ul></div>
6 <script src="../../resources/dump-as-markup.js"></script>
7 <script src="../editing.js"></script>
8 <script>
9 var e = document.getElementById("test2");
10 var s = window.getSelection();
12 Markup.description(document.querySelector('p').textContent);
13 Markup.dump(e, 'Before insertion');
15 setSelectionCommand(e, 0, e, 0);
16 for (var i = 0; i < 5; ++i)
17 moveSelectionForwardByCharacterCommand();
18 insertHTMLCommand("<div>foo</div><div>bar</div>");
20 Markup.dump(e, 'After insertion');
21 </script>
22 </body>
23 </html>