Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / inserting / insert-div-021.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
5 <div style="border: none; height: 12px"></div>
6 <span id="test">foo</span><br>bar
7 </div>
8 <script src="../../resources/dump-as-markup.js"></script>
9 <script>
10
11 if (window.testRunner)
12     testRunner.dumpEditingCallbacks();
13
14 var root = document.getElementById('root');
15 root.focus();
16 window.getSelection().collapse(document.getElementById('test'), 0);
17
18 for (i = 0; i < 4; i++)
19     window.getSelection().modify('move', 'forward', 'character');
20
21 document.execCommand('Delete');
22 document.execCommand('InsertParagraph');
23 document.execCommand('InsertParagraph');
24
25 Markup.description('Test inserting paragraphs: should see "foo", then an empty line, then "bar" in the next line.\n'+
26 'Fix for this bug: <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline');
27 Markup.dump(root);
28
29 </script>
30 </body>
31 </html>