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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/move-by-character-6.html

Issue 1809963002: [Editing][CodeHealth] Use w3c testharness in editing/seletion/move-by-* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update 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="root" class="editing">
5 <span id="sample">foo bar baz</span>
6 </div>
7 <div id="log"></div>
8 <script>
9 test(function() {
10 var selection = window.getSelection();
11 var sample = document.getElementById('sample');
12 selection.collapse(sample, 0);
13 for (i = 0; i < 11; ++i)
14 selection.modify('move', 'forward', 'character');
15 for (i = 0; i < 11; ++i)
16 selection.modify('move', 'backward', 'character');
17
18 assert_true(selection.isCollapsed, 'isCollapsed');
19 assert_equals(selection.anchorNode, sample.firstChild, 'anchorNode');
20 assert_equals(selection.anchorOffset, 0, 'anchorOffset');
21 });
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698