Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/select_all/select_all_html.html

Issue 2695193002: Selection API: setBaseAndExtent() and selectAllChildren() should create new Range based on the spec… (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698