summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/pasteboard/merge-end-table.html
blob: 93e76b741f1679a4bcd5a66110f6ca3f3089e8c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html>
<body>
<p>This tests pasting a table into a position that would normally result in an end merge.</p>
<div id="test1" contenteditable="true">xx</div>
<script src="../../resources/dump-as-markup.js"></script>
<script src="../editing.js"></script>
<script>
if (window.layoutTestController)
    layoutTestController.dumpEditingCallbacks();

var e = document.getElementById("test1");
var s = window.getSelection();

Markup.description(document.querySelector('p').textContent);
Markup.dump(e, 'Before insertion');

setSelectionCommand(e, 0, e, 0);
moveSelectionForwardByCharacterCommand();
insertHTMLCommand("<table border='1'><tr><td>1</td><td>2</td></tr></table>");

Markup.dump(e, 'After insertion');
</script>
</body>
</html>