| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 | 5 |
| 6 <div contenteditable>Also bug if moved to here</div> | 6 <div contenteditable>Also bug if moved to here</div> |
| 7 <div contentEditable>Bug if moved to here</div> | 7 <div contentEditable>Bug if moved to here</div> |
| 8 <div id="before" contenteditable>Selection starts here, and should not go out fr
om here</div> | 8 <div id="before" contenteditable>Selection starts here, and should not go out fr
om here</div> |
| 9 <div contenteditable>Bug if moved to here</div> | 9 <div contenteditable>Bug if moved to here</div> |
| 10 <div contenteditable>Also bug if moved to here</div> | 10 <div contenteditable>Also bug if moved to here</div> |
| 11 | 11 |
| 12 <script> | 12 <script> |
| 13 description("Ensure that moving a selection does not skip adjacent contenteditab
le if the current is contentEditable."); | 13 description("Ensure that moving a selection does not skip adjacent contenteditab
le if the current is contentEditable."); |
| 14 | 14 |
| 15 var before = document.getElementById("before"); | 15 var before = document.getElementById("before"); |
| 16 var selection = window.getSelection(); | 16 var selection = window.getSelection(); |
| 17 selection.collapse(before, 0); | 17 selection.collapse(before, 0); |
| 18 selection.modify("move", "backward", "character"); | 18 selection.modify("move", "backward", "character"); |
| 19 shouldBe("selection.focusNode.parentElement", "before"); | 19 shouldBe("selection.focusNode", "before"); |
| 20 | 20 |
| 21 selection.collapse(before, 1); | 21 selection.collapse(before, 1); |
| 22 selection.modify("move", "forward", "character"); | 22 selection.modify("move", "forward", "character"); |
| 23 shouldBe("selection.focusNode.parentElement", "before"); | 23 shouldBe("selection.focusNode", "before"); |
| 24 </script> | 24 </script> |
| 25 </body> | 25 </body> |
| 26 </html> | 26 </html> |
| OLD | NEW |