| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <meter id="root" contenteditable><span id="wrapper">xxx</span></meter> | 4 <meter id="root" contenteditable><span id="wrapper">xxx</span></meter> |
| 5 | 5 |
| 6 <script> | 6 <script> |
| 7 if (window.layoutTestController) | 7 if (window.layoutTestController) |
| 8 layoutTestController.dumpAsText(); | 8 layoutTestController.dumpAsText(); |
| 9 | 9 |
| 10 var originalContent = root.outerHTML; | 10 var originalContent = root.outerHTML; |
| 11 var sel = window.getSelection(); | 11 var sel = window.getSelection(); |
| 12 sel.setPosition(document.getElementById("wrapper"), 1); | 12 sel.setPosition(document.getElementById("wrapper"), 1); |
| 13 document.execCommand("InsertParagraph", false, null); | 13 document.execCommand("InsertParagraph", false, null); |
| 14 var editedContent = root.outerHTML; | 14 var editedContent = root.outerHTML; |
| 15 root.style.display = 'none'; // Remove from output. | 15 root.style.display = 'none'; // Remove from output. |
| 16 | 16 |
| 17 document.writeln('This test ensures that WebKit does not crash or edit the c
ontent when the selection is outside of the contenteditable area.<br><br>'); | 17 document.writeln('This test ensures that WebKit does not crash or edit the c
ontent 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); | 18 document.writeln(originalContent == editedContent ? 'PASS' : 'FAIL: expected
' + originalContent + ' but was changed to ' + editedContent); |
| 19 </script> | 19 </script> |
| 20 </body> | 20 </body> |
| 21 </html> | 21 </html> |
| OLD | NEW |