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