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

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: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/text/selection-exceptions.html ('k') | Source/bindings/bindings.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '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
OLDNEW
« 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