| 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">a<img src="../../resources/abe.png">new | |
| 7 <br>nation <i> </i> <img src="../../resources/abe.png"> | |
| 8 | |
| 9 | |
| 10 conceived | |
| 11 <br>nation<img src="../../resources/abe.png"></span> | |
| 12 </div> | |
| 13 <div id="log"></div> | |
| 14 <script> | |
| 15 test(function () { | |
| 16 var selection = getSelection(); | |
| 17 selection.collapse(span.firstChild, 0); | |
| 18 for (i = 0; i < 33; i++) { | |
| 19 selection.modify("extend", "forward", "character"); | |
| 20 } | |
| 21 assert_equals(selection.anchorNode, span.firstChild); | |
| 22 assert_equals(selection.anchorOffset, 0); | |
| 23 assert_equals(selection.focusNode, span.childNodes[10]); // "nation" text | |
| 24 assert_equals(selection.focusOffset, 6); | |
| 25 }); | |
| 26 </script> | |
| 27 | |
| 28 </body> | |
| OLD | NEW |