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

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

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 </head> 4 </head>
5 <body> 5 <body>
6 <script src="../js/resources/js-test-pre.js"></script> 6 <script src="../js/resources/js-test-pre.js"></script>
7 <script> 7 <script>
8 description("This tests that 'Selection' methods throw exceptions with r easonable messages."); 8 description("This tests that 'Selection' methods throw exceptions with r easonable messages.");
9 9
10 shouldThrow('getSelection().collapse(document.documentElement, -1)', '"I ndexSizeError: Failed to execute \'collapse\' on \'Selection\': -1 is not a vali d offset."'); 10 shouldThrow('getSelection().collapse(document.documentElement, -1)', '"I ndexSizeError: Failed to execute \'collapse\' on \'Selection\': -1 is not a vali d offset."');
11 11
12 getSelection().empty(); 12 getSelection().empty();
13 shouldThrow('getSelection().collapseToStart()', '"InvalidStateError: Fai led to execute \'collapseToStart\' on \'Selection\': there is no selection."'); 13 shouldThrow('getSelection().collapseToStart()', '"InvalidStateError: Fai led to execute \'collapseToStart\' on \'Selection\': there is no selection."');
14 shouldThrow('getSelection().collapseToEnd()', '"InvalidStateError: Faile d to execute \'collapseToEnd\' on \'Selection\': there is no selection."'); 14 shouldThrow('getSelection().collapseToEnd()', '"InvalidStateError: Faile d to execute \'collapseToEnd\' on \'Selection\': there is no selection."');
15 15
16 shouldThrow('getSelection().setBaseAndExtent(document.documentElement, - 1, document.documentElement, 0)', '"IndexSizeError: Failed to execute \'setBaseA ndExtent\' on \'Selection\': -1 is not a valid base offset."'); 16 shouldThrow('getSelection().setBaseAndExtent(document.documentElement, - 1, document.documentElement, 0)', '"IndexSizeError: Failed to execute \'setBaseA ndExtent\' on \'Selection\': -1 is not a valid base offset."');
17 shouldThrow('getSelection().setBaseAndExtent(document.documentElement, 0 , document.documentElement, -1)', '"IndexSizeError: Failed to execute \'setBaseA ndExtent\' on \'Selection\': -1 is not a valid extent offset."'); 17 shouldThrow('getSelection().setBaseAndExtent(document.documentElement, 0 , document.documentElement, -1)', '"IndexSizeError: Failed to execute \'setBaseA ndExtent\' on \'Selection\': -1 is not a valid extent offset."');
18 18
19 shouldThrow('getSelection().setPosition(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'setPosition\' on \'Selection\': -1 is not a valid offset."'); 19 shouldThrow('getSelection().setPosition(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'setPosition\' on \'Selection\': -1 is not a valid offset."');
20 20
21 shouldThrow('getSelection().getRangeAt(-1)', '"IndexSizeError: Failed to execute \'getRangeAt\' on \'Selection\': -1 is not a valid index."'); 21 shouldThrow('getSelection().getRangeAt(-1)', '"IndexSizeError: Failed to execute \'getRangeAt\' on \'Selection\': -1 is not a valid index."');
22 22
23 shouldThrow('getSelection().extend(0, -1)', '"TypeMismatchError: Failed to execute \'extend\' on \'Selection\': The node provided is invalid."'); 23 shouldThrow('getSelection().extend(0, -1)', '"TypeMismatchError: Failed to execute \'extend\' on \'Selection\': The node provided is invalid."');
24 shouldThrow('getSelection().extend(document.documentElement, -1)', '"Ind exSizeError: Failed to execute \'extend\' on \'Selection\': -1 is not a valid of fset."'); 24 shouldThrow('getSelection().extend(document.documentElement, -1)', '"Ind exSizeError: Failed to execute \'extend\' on \'Selection\': -1 is not a valid of fset."');
25 shouldThrow('getSelection().extend(document.documentElement, 1000)', '"I ndexSizeError: Failed to execute \'extend\' on \'Selection\': 1000 is larger tha n the given node\'s length."'); 25 shouldThrow('getSelection().extend(document.documentElement, 1000)', '"I ndexSizeError: Failed to execute \'extend\' on \'Selection\': 1000 is larger tha n the given node\'s length."');
26 </script> 26 </script>
27 <script src="../js/resources/js-test-post.js"></script>
28 </body> 27 </body>
29 </html> 28 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/script-tests/TEMPLATE.html ('k') | LayoutTests/fast/text/soft-hyphen-5.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698