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

Side by Side Diff: LayoutTests/fast/dom/Range/range-on-detached-node.html

Issue 58533003: Move fast/js/resources files to resources. (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 <div id="container"> 1 <div id="container">
2 <p id="description"></p> 2 <p id="description"></p>
3 <div id="sample">0123<b>45</b>6789</div> 3 <div id="sample">0123<b>45</b>6789</div>
4 </div> 4 </div>
5 <div id="console"></div> 5 <div id="console"></div>
6 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../../../resources/js-test.js"></script>
7 <script> 7 <script>
8 description('Range on detached node should not throw exception.'); 8 description('Range on detached node should not throw exception.');
9 function $(id) { return document.getElementById(id); } 9 function $(id) { return document.getElementById(id); }
10 10
11 function invalidNodeMessage(methodName) 11 function invalidNodeMessage(methodName)
12 { 12 {
13 return '"InvalidNodeTypeError: Failed to execute \'' + methodName + '\' on \ 'Range\': the given Node has no parent."' 13 return '"InvalidNodeTypeError: Failed to execute \'' + methodName + '\' on \ 'Range\': the given Node has no parent."'
14 } 14 }
15 15
16 var sample = $('sample').cloneNode(true); 16 var sample = $('sample').cloneNode(true);
17 var range = document.createRange(); 17 var range = document.createRange();
18 18
19 shouldBe('range.selectNode(sample.firstChild); range.startContainer', 'sample'); 19 shouldBe('range.selectNode(sample.firstChild); range.startContainer', 'sample');
20 shouldBe('range.setEndBefore(sample.firstChild); range.startContainer', 'sample' ); 20 shouldBe('range.setEndBefore(sample.firstChild); range.startContainer', 'sample' );
21 shouldBe('range.setEndAfter(sample.firstChild); range.startContainer', 'sample') ; 21 shouldBe('range.setEndAfter(sample.firstChild); range.startContainer', 'sample') ;
22 shouldBe('range.setStartAfter(sample.firstChild); range.startContainer', 'sample '); 22 shouldBe('range.setStartAfter(sample.firstChild); range.startContainer', 'sample ');
23 shouldBe('range.setStartBefore(sample.firstChild); range.startContainer', 'sampl e'); 23 shouldBe('range.setStartBefore(sample.firstChild); range.startContainer', 'sampl e');
24 24
25 shouldThrow('range.selectNode(sample); range.startContainer', invalidNodeMessage ('selectNode')); 25 shouldThrow('range.selectNode(sample); range.startContainer', invalidNodeMessage ('selectNode'));
26 shouldThrow('range.setEndAfter(sample); range.startContainer', invalidNodeMessag e('setEndAfter')); 26 shouldThrow('range.setEndAfter(sample); range.startContainer', invalidNodeMessag e('setEndAfter'));
27 shouldThrow('range.setEndBefore(sample); range.startContainer', invalidNodeMessa ge('setEndBefore')); 27 shouldThrow('range.setEndBefore(sample); range.startContainer', invalidNodeMessa ge('setEndBefore'));
28 shouldThrow('range.setStartAfter(sample); range.startContainer', invalidNodeMess age('setStartAfter')); 28 shouldThrow('range.setStartAfter(sample); range.startContainer', invalidNodeMess age('setStartAfter'));
29 shouldThrow('range.setStartBefore(sample); range.startContainer', invalidNodeMes sage('setStartBefore')); 29 shouldThrow('range.setStartBefore(sample); range.startContainer', invalidNodeMes sage('setStartBefore'));
30 30
31 if (window.testRunner) 31 if (window.testRunner)
32 $('container').outerHTML = ''; 32 $('container').outerHTML = '';
33 </script> 33 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Range/range-modifycontents.html ('k') | LayoutTests/fast/dom/Range/script-tests/TEMPLATE.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698