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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/collapse/collapse_before_select.html

Issue 1806423003: Convert editing/selection layout tests to use w3c test harness, volume 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 <div contenteditable id="anchor"><select><option>One</option></select>blaa</div>
5 <div id="log"></div>
6 <script>
7 test(function() {
8 var selection = window.getSelection();
9 var select = document.querySelector('select');
10 selection.collapse(select, 0);
11
12 var anchor = document.getElementById('anchor');
13 assert_equals(selection.anchorNode, anchor, 'anchorNode');
14 assert_equals(selection.anchorOffset, 0, 'anchorOffset');
15 assert_equals(selection.focusNode, anchor, 'focusNode');
16 assert_equals(selection.focusOffset, 0, 'focusOffset');
17 }, 'can not place caret inside SELECT element');
18 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698