Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / paragraph-in-preserveNewline.html
blobee7465f79fe86445154a79e3dce91a63b1512ac6
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p id="description">This tests for a bug where deleting a paragraph in preserveNewline text would introduce an extra line. You should see '\nbar' below.</p>
5 <div id="test" contenteditable="true"><pre>foo
6 bar</pre></div>
8 <script src="../../resources/dump-as-markup.js"></script>
9 <script>
10 function runTestsOn(platform) {
11 var sel = window.getSelection();
12 var e = document.getElementById("test");
14 if (window.internals)
15 internals.settings.setEditingBehavior(platform);
17 sel.collapse(e, 0);
18 sel.modify("extend", "forward", "character");
19 sel.modify("extend", "forward", "character");
20 sel.modify("extend", "forward", "character");
21 document.execCommand("Delete");
22 Markup.dump("test", "on " + platform);
23 document.execCommand("undo");
24 Markup.dump("test", "after undo on " + platform);
27 if (window.testRunner)
28 testRunner.dumpEditingCallbacks();
29 Markup.description(description.textContent);
30 Markup.dump("test", "initial state");
31 runTestsOn("mac");
32 runTestsOn("win");
33 runTestsOn("unix");
34 runTestsOn("android");
35 </script>
36 </body>
37 </html>