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

Side by Side Diff: LayoutTests/editing/selection/selectAllChildren.html

Issue 813163007: Enable strict type checking for Selection.selectAllChildren() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/editing/selection/selectAllChildren-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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <div id="test"><span id="span1">foo</span><span>bar</span></div> 6 <div id="test"><span id="span1">foo</span><span>bar</span></div>
7 <div id="console"></div> 7 <div id="console"></div>
8 <script> 8 <script>
9 var s = window.getSelection(); 9 var s = window.getSelection();
10 var testDiv = document.getElementById("test"); 10 var testDiv = document.getElementById("test");
(...skipping 21 matching lines...) Expand all
32 32
33 // replace the selection with span1's children 33 // replace the selection with span1's children
34 s.selectAllChildren(span1); 34 s.selectAllChildren(span1);
35 shouldBe('window.getSelection().toString()', '"foo"'); 35 shouldBe('window.getSelection().toString()', '"foo"');
36 36
37 // replace the selection with test's children 37 // replace the selection with test's children
38 s.selectAllChildren(test); 38 s.selectAllChildren(test);
39 shouldBe('window.getSelection().toString()', '"foobar"'); 39 shouldBe('window.getSelection().toString()', '"foobar"');
40 40
41 // call with types other than Node 41 // call with types other than Node
42 shouldNotThrow('s.selectAllChildren(null)'); 42 shouldThrow('s.selectAllChildren(null)');
43 shouldNotThrow('s.selectAllChildren(window)'); 43 shouldThrow('s.selectAllChildren(window)');
44 shouldNotThrow('s.selectAllChildren("")'); 44 shouldThrow('s.selectAllChildren("")');
45 </script> 45 </script>
46 </body> 46 </body>
47 </html> 47 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/selection/selectAllChildren-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698