Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / inserting / editable-html-element.html
1 <html contenteditable="true">
2 <script>
3 if (window.testRunner)
4      testRunner.dumpEditingCallbacks();
5 </script>
6
7 <script>
8 function runTest() {
9     var s = window.getSelection();
10     var e = document.getElementById("test");
11     
12     s.collapse(e, 0);
13     document.execCommand("InsertText", false, "This tests to make sure that when the enclosing block is the body element, and when the html element is editable,  inserting a paragraph separator doesn't split the body (inserting a paragraph separator usually splits/clones the enclosing block flow element).");
14     s.collapse(e, 0);
15     s.modify("move", "forward", "line");
16     s.modify("move", "forward", "line");
17     s.modify("move", "forward", "line");
18     document.execCommand("InsertParagraph"); 
19 }
20 </script>
21 <body id="test" onLoad="runTest();"></body>
22 </html>