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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/inserting/typing.html

Issue 2184503003: Convert editing/inserting/typing-00[1-3].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-26T14:42:22 Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/inserting/typing-001.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 test(() => assert_selection(
7 '<div contenteditable><span>|XXXX</span></div>',
8 selection => {
9 for (var i = 0; i < 3; ++i)
10 selection.document.execCommand('insertText', false, 'a');
11 for (var i = 0; i < 2; ++i)
12 selection.modify('move', 'forward', 'character');
13 for (var i = 0; i < 3; ++i)
14 selection.document.execCommand('insertText', false, 'b');
15 for (var i = 0; i < 2; ++i)
16 selection.modify('move', 'forward', 'character');
17 for (var i = 0; i < 3; ++i)
18 selection.document.execCommand('insertText', false, 'c');
19 },
20 '<div contenteditable><span>aaaXXbbbXXccc|</span></div>'),
21 'Typing simulation 1');
22
23 test(() => assert_selection(
24 '<div contenteditable>|Foo <i> bar</i></div>',
25 selection => {
26 for (var i = 0; i < 4; ++i)
27 selection.modify('move', 'forward', 'character');
28 for (var i = 0; i < 3; ++i)
29 selection.document.execCommand('insertText', false, 'x');
30 },
31 '<div contenteditable>Foo xxx|<i>bar</i></div>'),
32 'Typing simulation 2');
33
34 test(() => assert_selection(
35 '<div contenteditable><span>|</span></div>',
36 selection => {
37 function typeWord(n) {
38 for (var i = 0; i < n; ++i)
39 selection.document.execCommand('insertText', false, 'x');
40 selection.document.execCommand('insertText', false, ' ');
41 }
42 typeWord(4);
43 typeWord(1);
44 typeWord(2);
45 },
46 '<div contenteditable>xxxx x xx\u{00A0}|<span></span></div>'),
47 'Typing simulation 3');
48 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/inserting/typing-001.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698