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

Side by Side Diff: LayoutTests/editing/selection/range-surroundContents-with-preceding-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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <div id="root"> 5 <div id="root">
6 <div id="targetForSurround"></div> 6 <div id="targetForSurround"></div>
7 <div id="description">Test that there is no crash when surroundContents is called with a node preceding the current selection.</div> 7 <div id="description">Test that there is no crash when surroundContents is called with a node preceding the current selection.</div>
8 <div id="trailingNode"></div> 8 <div id="trailingNode"></div>
9 </div> 9 </div>
10 <script> 10 <script>
11 var range = document.createRange(); 11 var range = document.createRange();
12 var rootNode = document.getElementById("root"); 12 var rootNode = document.getElementById("root");
13 range.setStart(rootNode, 4); 13 range.setStart(rootNode, 4);
14 range.setEnd(rootNode, 6); 14 range.setEnd(rootNode, 6);
15 var parentElement = document.getElementById("targetForSurround"); 15 var parentElement = document.getElementById("targetForSurround");
16 range.surroundContents(parentElement); 16 range.surroundContents(parentElement);
17 17
18 shouldBe('range.startContainer.id', 'rootNode.id'); 18 shouldBe('range.startContainer.id', 'rootNode.id');
19 shouldBe('range.startOffset', '3'); 19 shouldBe('range.startOffset', '3');
20 shouldBe('range.endContainer.id', 'rootNode.id'); 20 shouldBe('range.endContainer.id', 'rootNode.id');
21 shouldBe('range.startOffset', '3'); 21 shouldBe('range.startOffset', '3');
22 </script> 22 </script>
23 </body> 23 </body>
24 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698