OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <script src="../../../resources/testharness.js"></script> | |
3 <script src="../../../resources/testharnessreport.js"></script> | |
4 <body contenteditable> | |
5 VisiblePositions created at [html, x] where html is non-editable should descend | |
6 into an editable body, for convenience. Everything on this page should be | |
7 selected. | |
8 <div id="log"></div> | |
9 </body> | |
10 <script> | |
11 test(function() { | |
12 var selection = window.getSelection(); | |
13 var html = document.documentElement; | |
14 selection.setBaseAndExtent(html, 1, html, 2); | |
15 var body = document.body; | |
16 assert_equals(selection.anchorNode, body.firstChild, 'anchorNode'); | |
17 assert_equals(selection.anchorOffset, 1, 'anchorOffset'); | |
18 assert_equals(selection.focusNode, body.firstChild, 'focusNode'); | |
19 assert_equals(selection.focusOffset, 165, 'focusOffset'); | |
20 }, 'special case of HTML element'); | |
21 </script> | |
OLD | NEW |