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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/addRange-failures.html

Issue 1511913002: Drop [LegacyInterfaceTypeChecking] for Selection.prototype.addRange (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/addRange-failures-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>addRange failures</title> 4 <title>addRange failures</title>
5 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/js-test.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 description('Test error handling of Selection.addRange().'); 9 description('Test error handling of Selection.addRange().');
10 10
11 var selection = window.getSelection(); 11 var selection = window.getSelection();
12 12
13 function testNull() 13 function testNull()
14 { 14 {
15 selection.addRange(null); 15 shouldThrow('selection.addRange(null)');
16 } 16 }
17 17
18 function testDetachedRange() 18 function testDetachedRange()
19 { 19 {
20 var range = new Range(); 20 var range = new Range();
21 range.detach(); 21 range.detach();
22 selection.addRange(range); 22 selection.addRange(range);
23 } 23 }
24 24
25 function testNotInDocumentRange() 25 function testNotInDocumentRange()
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 shouldEvaluateTo('selection.getRangeAt(0).startOffset', 0); 71 shouldEvaluateTo('selection.getRangeAt(0).startOffset', 0);
72 shouldBeTrue('selection.getRangeAt(0).endContainer === document.body'); 72 shouldBeTrue('selection.getRangeAt(0).endContainer === document.body');
73 shouldEvaluateTo('selection.getRangeAt(0).endOffset', 0); 73 shouldEvaluateTo('selection.getRangeAt(0).endOffset', 0);
74 } 74 }
75 75
76 var testFunctions = [testNull, testDetachedRange, testNotInDocumentRange, testOt herDocument, testOtherDocumentFragments]; 76 var testFunctions = [testNull, testDetachedRange, testNotInDocumentRange, testOt herDocument, testOtherDocumentFragments];
77 testFunctions.forEach(runSingleTest); 77 testFunctions.forEach(runSingleTest);
78 </script> 78 </script>
79 </body> 79 </body>
80 </html> 80 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/addRange-failures-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698