| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| var successfullyParsed = false; |
| <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."); |
| if (window.layoutTestController) { |
| layoutTestController.overridePreference("WebKitEnableCaretBrowsing", true); |
| layoutTestController.dumpAsText(); |
| layoutTestController.dumpEditingCallbacks(); |
| startPoint = document.getElementById("startHere"); |
| window.getSelection().setPosition(startPoint.childNodes.item(0), 5); |
| // Move to the beginning and the end of the document. |
| layoutTestController.execCommand("MoveToBeginningOfDocument"); |
| layoutTestController.execCommand("MoveToEndOfDocument"); |
| // Try the same commands modifying the selection. |
| layoutTestController.execCommand("MoveToBeginningOfDocumentAndModifySelection"); |
| window.getSelection().setPosition(startPoint.childNodes.item(0), 5); |
| layoutTestController.execCommand("MoveToEndOfDocumentAndModifySelection"); |
| successfullyParsed = true; |
| <script src="../../../../fast/js/resources/js-test-post.js"></script> |