Explicitly set editingBehavior in some tests.
[WebKit-https.git] / LayoutTests / editing / pasteboard / merge-end-5.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <div id="test" contenteditable="true"><div style="border: 1px solid red;">This x</div><div style="border: 1px solid blue;">x it.</div></div>
5
6 <script src="../../resources/dump-as-markup.js"></script>
7 <script>
8 if (window.testRunner)
9     testRunner.dumpEditingCallbacks();
10 if (window.internals)
11     internals.settings.setEditingBehavior("mac");
12
13 Markup.description('Pasting a paragraph or less into a selection that spans multiple blocks should insert content into the block containing the start of the selection.');
14
15 var s = window.getSelection();
16 var e = document.getElementById("test");
17
18 s.setPosition(e, 0);
19
20 s.modify("move", "forward", "word");
21 s.modify("move", "forward", "character");
22 s.modify("extend", "forward", "word");
23 s.modify("extend", "forward", "word");
24
25 document.execCommand("InsertHTML", false, "<div><div>text should have a red border around</div></div>");
26
27 Markup.dump('test');
28
29 </script>
30 </body>
31 </html>