Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / inserting / insert-paragraph-selection-outside-contenteditable.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4     <meter id="root" contenteditable><span id="wrapper">xxx</span></meter>
5
6     <script>
7     if (window.testRunner)
8         testRunner.dumpAsText();
9
10     var originalContent = root.outerHTML;
11     var sel = window.getSelection();
12     sel.collapse(document.getElementById("wrapper"), 1);
13     document.execCommand("InsertParagraph", false, null);
14     var editedContent = root.outerHTML;
15     root.style.display = 'none'; // Remove from output.
16
17     document.writeln('This test ensures that WebKit does not crash or edit the content when the selection is outside of the contenteditable area.<br><br>');
18     document.writeln(originalContent == editedContent ? 'PASS' : 'FAIL: expected ' +  originalContent + ' but was changed to ' + editedContent);
19   </script>
20 </body>
21 </html>