Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: LayoutTests/fast/text/selection-exceptions-expected.txt

Issue 22608004: Improve 'Selection' exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ugh. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/text/selection-exceptions.html ('k') | Source/bindings/bindings.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..317b9564a6e09e31f3ab7c3d79171c51b2aac0da
--- /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 'Selection': -1 is not a valid offset..
+PASS getSelection().collapseToStart() threw exception InvalidStateError: Failed to execute 'collapseToStart' on 'Selection': there is no selection..
+PASS getSelection().collapseToEnd() threw exception InvalidStateError: Failed to execute 'collapseToEnd' on 'Selection': there is no selection..
+PASS getSelection().setBaseAndExtent(document.documentElement, -1, document.documentElement, 0) threw exception IndexSizeError: Failed to execute 'setBaseAndExtent' on 'Selection': -1 is not a valid base offset..
+PASS getSelection().setBaseAndExtent(document.documentElement, 0, document.documentElement, -1) threw exception IndexSizeError: Failed to execute 'setBaseAndExtent' on 'Selection': -1 is not a valid extent offset..
+PASS getSelection().setPosition(document.documentElement, -1) threw exception IndexSizeError: Failed to execute 'setPosition' on 'Selection': -1 is not a valid offset..
+PASS getSelection().getRangeAt(-1) threw exception IndexSizeError: Failed to execute 'getRangeAt' on 'Selection': -1 is not a valid index..
+PASS getSelection().extend(0, -1) threw exception TypeMismatchError: Failed to execute 'extend' on 'Selection': The node provided is invalid..
+PASS getSelection().extend(document.documentElement, -1) threw exception IndexSizeError: Failed to execute 'extend' on 'Selection': -1 is not a valid offset..
+PASS getSelection().extend(document.documentElement, 1000) threw exception IndexSizeError: Failed to execute 'extend' on 'Selection': 1000 is larger than the given node's length..
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
« no previous file with comments | « LayoutTests/fast/text/selection-exceptions.html ('k') | Source/bindings/bindings.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698