Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / paragraph-separator-03.html
blobe99ba513f7ce057e47e9bef1719d5e4073a0565b
1 <script>
2 if (window.testRunner)
3 testRunner.dumpEditingCallbacks();
4 </script>
5 <p>Tests for a bug in the paragraph separator insertion code that would add an extra newline when inserting a paragraph separator at the end of a paragraph in text that preserves newlines. Also, an extraneous space would be added after 'foo'. Only one newline should be added. And there should be no extraneous spaces.</p>
6 <p><b>It demonstrates a bug:</b> too much padding is left between the new line and the end of the paragraph containing 'foo'.</p>
7 <div id="test" contenteditable="true"><pre>foo
8 bar</pre></div>
10 <script type="text/javascript" src="../editing.js"></script>
11 <script>
12 if (window.internals)
13 internals.settings.setEditingBehavior("mac");
14 var e = document.getElementById("test");
15 var s = window.getSelection();
17 setSelectionCommand(e, 0, e, 0);
18 moveSelectionForwardByWordCommand();
19 insertParagraphCommand();
20 </script>