Index: LayoutTests/fast/text/selection-exceptions-expected.txt |
diff --git a/LayoutTests/fast/text/selection-exceptions-expected.txt b/LayoutTests/fast/text/selection-exceptions-expected.txt |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fa6e37523894fef6e674f86bab320cd58bbfdc3a |
--- /dev/null |
+++ b/LayoutTests/fast/text/selection-exceptions-expected.txt |
@@ -0,0 +1,19 @@ |
+This tests that 'Selection' methods throw exceptions with reasonable messages. |
+ |
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
+ |
+ |
+PASS getSelection().collapse(document.documentElement, -1) threw exception IndexSizeError: Failed to execute 'collapse' on a 'Selection' object: -1 is not a valid offset.. |
+PASS getSelection().collapseToStart() threw exception InvalidStateError: Failed to execute 'collapseToStart' on a 'Selection' object: there is no selection.. |
+PASS getSelection().collapseToEnd() threw exception InvalidStateError: Failed to execute 'collapseToEnd' on a 'Selection' object: there is no selection.. |
+PASS getSelection().setBaseAndExtent(document.documentElement, -1, document.documentElement, 0) threw exception IndexSizeError: Failed to execute 'setBaseAndExtent' on a 'Selection' object: -1 is not a valid base offset.. |
+PASS getSelection().setBaseAndExtent(document.documentElement, 0, document.documentElement, -1) threw exception IndexSizeError: Failed to execute 'setBaseAndExtent' on a 'Selection' object: -1 is not a valid extent offset.. |
+PASS getSelection().setPosition(document.documentElement, -1) threw exception IndexSizeError: Failed to execute 'setPosition' on a 'Selection' object: -1 is not a valid offset.. |
+PASS getSelection().getRangeAt(-1) threw exception IndexSizeError: Failed to execute 'getRangeAt' on a 'Selection' object: -1 is not a valid index.. |
+PASS getSelection().extend(0, -1) threw exception TypeMismatchError: Failed to execute 'extend' on a 'Selection' object: The node provided is invalid.. |
+PASS getSelection().extend(document.documentElement, -1) threw exception IndexSizeError: Failed to execute 'extend' on a 'Selection' object: -1 is not a valid offset.. |
+PASS getSelection().extend(document.documentElement, 1000) threw exception IndexSizeError: Failed to execute 'extend' on a 'Selection' object: 1000 is larger than the given node's length.. |
+PASS successfullyParsed is true |
+ |
+TEST COMPLETE |
+ |