| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <meter id="root" contenteditable><span id="wrapper">xxx</span></meter> | |
| <script> | |
| if (window.testRunner) | |
| testRunner.dumpAsText(); | |
| var originalContent = root.outerHTML; | |
| var sel = window.getSelection(); | |
| sel.setPosition(document.getElementById("wrapper"), 1); | |
| document.execCommand("InsertParagraph", false, null); | |
| var editedContent = root.outerHTML; | |
| root.style.display = 'none'; // Remove from output. | |
| 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>'); | |
| document.writeln(originalContent == editedContent ? 'PASS' : 'FAIL: expected ' + originalContent + ' but was changed to ' + editedContent); | |
| </script> | |
| </body> | |
| </html> |