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

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

Issue 2718543003: Remove EditingAppleTabSpan class handling (Closed)
Patch Set: Make editing/inserting/5549929-2.html pass Created 3 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
1 <!doctype html> 1 <!doctype html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script> 4 <script src="../assert_selection.js"></script>
5 <script> 5 <script>
6 test(() => assert_selection( 6 test(() => assert_selection(
7 [ 7 [
8 '<div contenteditable>', 8 '<div contenteditable>',
9 '<span>|foo</span>', 9 '<span>|foo</span>',
10 '</div>', 10 '</div>',
11 ].join(''), 11 ].join(''),
12 'insertText \t', 12 'insertText \t',
13 [ 13 [
14 '<div contenteditable>', 14 '<div contenteditable>',
15 '<span>', 15 '<span>',
16 '<span class="Apple-tab-span" style="white-space:pre">\t|</span> ', 16 '<span style="white-space:pre">\t|</span>',
17 'foo', 17 'foo',
18 '</span>', 18 '</span>',
19 '</div>' 19 '</div>'
20 ].join('')), 20 ].join('')),
21 'Insert a tab character before text'); 21 'Insert a tab character before text');
22 22
23 test(() => assert_selection( 23 test(() => assert_selection(
24 [ 24 [
25 '<div contenteditable>', 25 '<div contenteditable>',
26 '<span>foo|</span>', 26 '<span>foo|</span>',
27 '</div>', 27 '</div>',
28 ].join(''), 28 ].join(''),
29 'insertText \t', 29 'insertText \t',
30 [ 30 [
31 '<div contenteditable>', 31 '<div contenteditable>',
32 '<span>', 32 '<span>',
33 'foo', 33 'foo',
34 '<span class="Apple-tab-span" style="white-space:pre">\t|</span> ', 34 '<span style="white-space:pre">\t|</span>',
35 '</span>', 35 '</span>',
36 '</div>' 36 '</div>'
37 ].join('')), 37 ].join('')),
38 'Insert a tab character after text'); 38 'Insert a tab character after text');
39 39
40 test(() => assert_selection( 40 test(() => assert_selection(
41 [ 41 [
42 '<div contenteditable>', 42 '<div contenteditable>',
43 '<span>fo|o</span>', 43 '<span>fo|o</span>',
44 '</div>', 44 '</div>',
45 ].join(''), 45 ].join(''),
46 'insertText \t', 46 'insertText \t',
47 [ 47 [
48 '<div contenteditable>', 48 '<div contenteditable>',
49 '<span>', 49 '<span>',
50 'fo', 50 'fo',
51 '<span class="Apple-tab-span" style="white-space:pre">\t|</span> ', 51 '<span style="white-space:pre">\t|</span>',
52 'o', 52 'o',
53 '</span>', 53 '</span>',
54 '</div>' 54 '</div>'
55 ].join('')), 55 ].join('')),
56 'Insert a tab character in text'); 56 'Insert a tab character in text');
57 57
58 test(() => assert_selection( 58 test(() => assert_selection(
59 [ 59 [
60 '<div contenteditable>', 60 '<div contenteditable>',
61 '<span>|foo</span>', 61 '<span>|foo</span>',
62 '</div>', 62 '</div>',
63 ].join(''), 63 ].join(''),
64 selection => { 64 selection => {
65 selection.document.execCommand('insertLineBreak'); 65 selection.document.execCommand('insertLineBreak');
66 selection.document.execCommand('insertText', false, '\t'); 66 selection.document.execCommand('insertText', false, '\t');
67 }, 67 },
68 [ 68 [
69 '<div contenteditable>', 69 '<div contenteditable>',
70 '<span>', 70 '<span>',
71 '<br>', 71 '<br>',
72 '<span class="Apple-tab-span" style="white-space:pre">\t|</span> ', 72 '<span style="white-space:pre">\t|</span>',
73 'foo', 73 'foo',
74 '</span>', 74 '</span>',
75 '</div>' 75 '</div>'
76 ].join('')), 76 ].join('')),
77 'Insert BR and a tab character before text'); 77 'Insert BR and a tab character before text');
78 </script> 78 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698