OLD | NEW |
(Empty) | |
| 1 This tests that 'Selection' methods throw exceptions with reasonable messages. |
| 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 |
| 5 |
| 6 PASS getSelection().collapse(document.documentElement, -1) threw exception Index
SizeError: Failed to execute 'collapse' on 'Selection': -1 is not a valid offset
.. |
| 7 PASS getSelection().collapseToStart() threw exception InvalidStateError: Failed
to execute 'collapseToStart' on 'Selection': there is no selection.. |
| 8 PASS getSelection().collapseToEnd() threw exception InvalidStateError: Failed to
execute 'collapseToEnd' on 'Selection': there is no selection.. |
| 9 PASS getSelection().setBaseAndExtent(document.documentElement, -1, document.docu
mentElement, 0) threw exception IndexSizeError: Failed to execute 'setBaseAndExt
ent' on 'Selection': -1 is not a valid base offset.. |
| 10 PASS getSelection().setBaseAndExtent(document.documentElement, 0, document.docum
entElement, -1) threw exception IndexSizeError: Failed to execute 'setBaseAndExt
ent' on 'Selection': -1 is not a valid extent offset.. |
| 11 PASS getSelection().setPosition(document.documentElement, -1) threw exception In
dexSizeError: Failed to execute 'setPosition' on 'Selection': -1 is not a valid
offset.. |
| 12 PASS getSelection().getRangeAt(-1) threw exception IndexSizeError: Failed to exe
cute 'getRangeAt' on 'Selection': -1 is not a valid index.. |
| 13 PASS getSelection().extend(0, -1) threw exception TypeMismatchError: Failed to e
xecute 'extend' on 'Selection': The node provided is invalid.. |
| 14 PASS getSelection().extend(document.documentElement, -1) threw exception IndexSi
zeError: Failed to execute 'extend' on 'Selection': -1 is not a valid offset.. |
| 15 PASS getSelection().extend(document.documentElement, 1000) threw exception Index
SizeError: Failed to execute 'extend' on 'Selection': 1000 is larger than the gi
ven node's length.. |
| 16 PASS successfullyParsed is true |
| 17 |
| 18 TEST COMPLETE |
| 19 |
OLD | NEW |