OLD | NEW |
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 | 5 |
6 <p id="before">Before the contenteditable</p> | 6 <p id="before">Before the contenteditable</p> |
7 <div contentEditable></div> | 7 <div contentEditable></div> |
8 <p id="after">After the contenteditable</p> | 8 <p id="after">After the contenteditable</p> |
9 | 9 |
10 <div id="console"></div> | 10 <div id="console"></div> |
11 <script> | 11 <script> |
12 description("Ensure that extending a selection skips past a contentEditable."); | 12 description("Ensure that extending a selection skips past a contentEditable."); |
13 | 13 |
14 var before = document.getElementById("before"); | 14 var before = document.getElementById("before"); |
(...skipping 20 matching lines...) Expand all Loading... |
35 sel.modify("extend", "forward", "line"); | 35 sel.modify("extend", "forward", "line"); |
36 shouldBe("sel.focusNode.parentElement", "after"); | 36 shouldBe("sel.focusNode.parentElement", "after"); |
37 | 37 |
38 sel.setBaseAndExtent(after, 5, after, 0); | 38 sel.setBaseAndExtent(after, 5, after, 0); |
39 sel.modify("extend", "backward", "line"); | 39 sel.modify("extend", "backward", "line"); |
40 shouldBe("sel.focusNode.parentElement", "before"); | 40 shouldBe("sel.focusNode.parentElement", "before"); |
41 </script> | 41 </script> |
42 | 42 |
43 </body> | 43 </body> |
44 </html> | 44 </html> |
OLD | NEW |