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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/modify_move/move_around_image.html

Issue 2446893006: Convert editing/selection/4932260-[123].html to utilize w3c test harness (Closed)
Patch Set: 2016-10-28T12:57:04 Created 4 years, 1 month 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 <script src="../../assert_selection.js"></script>
5 <script>
6 const isMac = navigator.platform.indexOf('Mac') === 0;
7
8 test(() => assert_selection(
9 [
10 '<div contenteditable>',
11 '|foo <img src="../../resources/abe.png"> bar',
12 '</div>',
13 ].join(''),
14 selection => selection.modify('move', 'forward', 'sentence'),
15 [
16 '<div contenteditable>',
17 'foo <img src="../../resources/abe.png"> bar|',
18 '</div>',
19 ].join('')),
20 'Move forward sentence');
21
22 test(() => assert_selection(
23 [
24 '<div contenteditable>',
25 'foo <img src="../../resources/abe.png"> bar|',
26 '</div>',
27 ].join(''),
28 selection => selection.modify('move', 'backward', 'sentence'),
29 [
30 '<div contenteditable>',
31 '|foo <img src="../../resources/abe.png"> bar',
32 '</div>',
33 ].join('')),
34 'Move backward sentence');
35
36 test(() => assert_selection(
37 [
38 '<div contenteditable>',
39 '|foo<img src="../../resources/abe.png">bar baz',
40 '</div>',
41 ].join(''),
42 selection => {
43 selection.modify('move', 'forward', 'word');
44 selection.modify('move', 'forward', 'word');
45 },
46 [
47 '<div contenteditable>',
48 isMac
49 ? 'foo<img src="../../resources/abe.png">bar| baz'
50 : 'foo<img src="../../resources/abe.png">bar |baz',
51 '</div>',
52 ].join('')),
53 'Move forward word');
54
55 test(() => assert_selection(
56 [
57 '<div contenteditable>',
58 'foo bar<img src="../../resources/abe.png">baz|',
59 '</div>',
60 ].join(''),
61 selection => {
62 selection.modify('move', 'backward', 'word');
63 selection.modify('move', 'backward', 'word');
64 },
65 [
66 '<div contenteditable>',
67 'foo |bar<img src="../../resources/abe.png">baz',
68 '</div>',
69 ].join('')),
70 'Move backward word');
71 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698