OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
3 <title>Range stringifier</title> | 3 <title>Range stringifier</title> |
4 <link rel="author" title="KiChjang" href="mailto:kungfukeith11@gmail.com"> | 4 <link rel="author" title="KiChjang" href="mailto:kungfukeith11@gmail.com"> |
5 <script src="../../../../resources/testharness.js"></script> | 5 <script src="../../../../resources/testharness.js"></script> |
6 <script src="../../../../resources/testharnessreport.js"></script> | 6 <script src="../../../../resources/testharnessreport.js"></script> |
7 <div id=test>Test div</div> | 7 <div id=test>Test div</div> |
8 <div id=another>Another div</div> | 8 <div id=another>Another div</div> |
9 <div id=last>Last div</div> | 9 <div id=last>Last div</div> |
10 <div id=log></div> | 10 <div id=log></div> |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 var lastDiv = document.getElementById("last"); | 36 var lastDiv = document.getElementById("last"); |
37 var lastText = lastDiv.childNodes[0]; | 37 var lastText = lastDiv.childNodes[0]; |
38 test(function() { | 38 test(function() { |
39 r.setStart(textNode, 5); | 39 r.setStart(textNode, 5); |
40 r.setEnd(lastText, 4); | 40 r.setEnd(lastText, 4); |
41 assert_equals(r.toString(), "div\nAnother div\nLast"); | 41 assert_equals(r.toString(), "div\nAnother div\nLast"); |
42 }, "Three nodes with start offset and end offset on text nodes"); | 42 }, "Three nodes with start offset and end offset on text nodes"); |
43 }); | 43 }); |
44 </script> | 44 </script> |
OLD | NEW |