| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../../editing/editing.js" language="JavaScript" type="text/JavaScript" ></script> |
| var successfullyParsed = false; |
| <div tabindex=0 id="container">This is a test of Safari web selection</div> |
| description("This tests that accessibility can pull out the selected text"); |
| if (window.accessibilityController) { |
| document.getElementById("container").focus(); |
| setSelectionCommand(document.getElementById('container'), 0, document.getElementById('container'), 0); |
| var focusedElement = accessibilityController.focusedElement; |
| for (var k = 0; k < 7; k++) |
| focusedElement.increaseTextSelection(); |
| for (var k = 0; k < 3; k++) |
| focusedElement.decreaseTextSelection(); |
| shouldBe("focusedElement.stringForSelection", "'This'"); |
| successfullyParsed = true; |
| <script src="../../resources/js-test-post.js"></script> |