Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / inserting / insert-paragraph-04.html
1 <script>
2 if (window.testRunner)
3      testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests inserting a paragraph separator after a horizontal rule.  You should see 'foo', empty paragraph, horizontal rule, 'bar', and the caret should be just after the horizontal rule. <b>This demonstrates 8345.  The caret after a horizontal rule is drawn in the same location as the caret before a horizontal rule.</p>
6 <div contenteditable="true" id="div">foo<hr>bar</div>
7
8 <script>
9 if (window.internals)
10     internals.settings.setEditingBehavior('mac');
11 var sel = window.getSelection();
12 var div = document.getElementById("div");
13 sel.collapse(div, 0);
14 sel.modify("move", "forward", "word");
15 sel.modify("move", "forward", "character");
16 sel.modify("move", "forward", "character");
17 document.execCommand("InsertParagraph");
18 </script>