| <script> |
| if (window.layoutTestController) |
| layoutTestController.dumpEditingCallbacks(); |
| </script> |
| <p>This tests to make sure that createMarkup puts an interchange newline on the pasteboard for a selection ending at the end of a block. Both regions below should have contents that are identical.</p> |
| |
| <div id="copy" contenteditable="true"><div><div>foo</div>bar</div>baz</div> |
| <div id="paste" contenteditable="true">foo</div> |
| |
| <script> |
| var sel = window.getSelection(); |
| var e = document.getElementById("copy"); |
| sel.setPosition(e, 0); |
| sel.modify("move", "forward", "word"); |
| sel.modify("extend", "forward", "line"); |
| sel.modify("extend", "forward", "line"); |
| document.execCommand("Copy"); |
| |
| e = document.getElementById("paste"); |
| sel.setPosition(e, 0); |
| sel.modify("move", "forward", "word"); |
| document.execCommand("Paste"); |
| </script> |