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

Side by Side Diff: LayoutTests/fast/text/selection-exceptions.html

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 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6 <script src="../js/resources/js-test-pre.js"></script>
7 <script>
8 description("This tests that 'Selection' methods throw exceptions with r easonable messages.");
9
10 shouldThrow('getSelection().collapse(document.documentElement, -1)');
11
12 getSelection().empty();
13 shouldThrow('getSelection().collapseToStart()');
14 shouldThrow('getSelection().collapseToEnd()');
15
16 shouldThrow('getSelection().setBaseAndExtent(document.documentElement, - 1, document.documentElement, 0)');
17 shouldThrow('getSelection().setBaseAndExtent(document.documentElement, 0 , document.documentElement, -1)');
18
19 shouldThrow('getSelection().setPosition(document.documentElement, -1)');
20
21 shouldThrow('getSelection().getRangeAt(-1)');
22
23 shouldThrow('getSelection().extend(0, -1)');
24 shouldThrow('getSelection().extend(document.documentElement, -1)');
25 shouldThrow('getSelection().extend(document.documentElement, 1000)');
26 </script>
27 <script src="../js/resources/js-test-post.js"></script>
28 </body>
29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698