OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <body> |
| 5 <div contenteditable id="root" class="editing"> |
| 6 <span id="span"><i>F and seven</i> years <b> as </b>our fathers f upon this |
| 7 continent, a new nation, conceived in Liberty, and
dedicated to the |
| 8 proposition that all |
| 9 <br>men are created equal.</span> |
| 10 </div> |
| 11 <div id="log"></div> |
| 12 <script> |
| 13 test(function () { |
| 14 var selection = getSelection(); |
| 15 selection.collapse(span.firstChild.firstChild, 0); |
| 16 for (i = 0; i < 159; i++) { |
| 17 selection.modify("extend", "forward", "character"); |
| 18 } |
| 19 for (i = 0; i < 158; i++) { |
| 20 selection.modify("extend", "backward", "character"); |
| 21 } |
| 22 assert_equals(selection.anchorNode, span.firstChild.firstChild); |
| 23 assert_equals(selection.anchorOffset, 0); |
| 24 assert_equals(selection.focusNode, span.firstChild.firstChild); |
| 25 assert_equals(selection.focusOffset, 1); |
| 26 }); |
| 27 </script> |
| 28 |
| 29 </body> |
OLD | NEW |