| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../../../fast/js/resources/js-test-pre.js"></script> |
| <p>A paragraph to finish.</p> |
| description("This tests direct navigation to the begin and end of the document in caret mode."); |
| testRunner.overridePreference("WebKitEnableCaretBrowsing", true); |
| testRunner.dumpEditingCallbacks(); |
| startPoint = document.getElementById("startHere"); |
| window.getSelection().setPosition(startPoint.childNodes.item(0), 5); |
| // Move to the beginning and the end of the document. |
| testRunner.execCommand("MoveToBeginningOfDocument"); |
| testRunner.execCommand("MoveToEndOfDocument"); |
| // Try the same commands modifying the selection. |
| testRunner.execCommand("MoveToBeginningOfDocumentAndModifySelection"); |
| window.getSelection().setPosition(startPoint.childNodes.item(0), 5); |
| testRunner.execCommand("MoveToEndOfDocumentAndModifySelection"); |
| <script src="../../../../fast/js/resources/js-test-post.js"></script> |