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

Side by Side 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: Rewording. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 a 'Selection' object: -1 is not a val id offset..
7 PASS getSelection().collapseToStart() threw exception InvalidStateError: Failed to execute 'collapseToStart' on a 'Selection' object: there is no selection..
8 PASS getSelection().collapseToEnd() threw exception InvalidStateError: Failed to execute 'collapseToEnd' on a 'Selection' object: there is no selection..
9 PASS getSelection().setBaseAndExtent(document.documentElement, -1, document.docu mentElement, 0) threw exception IndexSizeError: Failed to execute 'setBaseAndExt ent' on a 'Selection' object: -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 a 'Selection' object: -1 is not a valid extent offset..
11 PASS getSelection().setPosition(document.documentElement, -1) threw exception In dexSizeError: Failed to execute 'setPosition' on a 'Selection' object: -1 is not a valid offset..
12 PASS getSelection().getRangeAt(-1) threw exception IndexSizeError: Failed to exe cute 'getRangeAt' on a 'Selection' object: -1 is not a valid index..
13 PASS getSelection().extend(0, -1) threw exception TypeMismatchError: Failed to e xecute 'extend' on a 'Selection' object: The node provided is invalid..
14 PASS getSelection().extend(document.documentElement, -1) threw exception IndexSi zeError: Failed to execute 'extend' on a 'Selection' object: -1 is not a valid o ffset..
15 PASS getSelection().extend(document.documentElement, 1000) threw exception Index SizeError: Failed to execute 'extend' on a 'Selection' object: 1000 is larger th an the given node's length..
16 PASS successfullyParsed is true
17
18 TEST COMPLETE
19
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698