Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / insert-paragraph-at-end-of-line.html
blob5fcffc48b42294f058c6e9ab3fbcef972a79bcc5
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/dump-as-markup.js"></script>
5 <script>
7 if (window.testRunner)
8 testRunner.dumpEditingCallbacks();
10 // Set up the div
11 var editable = document.createElement('div');
12 editable.contentEditable = true;
13 editable.innerHTML = '<a href="#" id="anchor">1</a><div>3</div>';
14 document.body.appendChild(editable);
15 editable.focus();
17 // Edit it with execCommand
18 var sel = window.getSelection();
19 sel.collapse(document.getElementById('anchor'), 1);
20 document.execCommand("InsertParagraph");
21 document.execCommand("InsertText", false, "2");
23 Markup.description('This tests the fix for <rdar://problem/6633727> - Hitting return at the end of a line with an anchor jumps me to the bottom of the message.\n'+
24 'If the test has passed, the numbers should be in order, and only "1" should be a link.');
25 Markup.dump(editable);
27 </script>
28 </body>
29 </html>