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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spelling-attribute-change.html

Issue 2453313005: Convert editing/spelling/spelling-attribute-change.html with spellcheck_test (Closed)
Patch Set: Make everything verbose 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
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!doctype html>
2 <html> 2 <script src="../../resources/testharness.js"></script>
3 <head> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../assert_selection.js"></script>
5 </head> 5 <script src="spellcheck_test.js"></script>
6 <body> 6
7 <p id="description"></p> 7 <script>
8 <div id="console"></div> 8 spellcheck_test(
9 <script src="script-tests/spelling-attribute-change.js"></script> 9 '<span contenteditable id="target"></span>',
10 </body> 10 document => {
11 </html> 11 const target = document.getElementById('target');
12 target.spellcheck = true;
13 target.focus();
14 document.execCommand('insertText', false, 'Hello,');
15 document.execCommand('insertText', false, 'zz.');
16 },
17 '<span contenteditable id="target" spellcheck="true">Hello,#zz#.</span>',
18 'Change "spellcheck" of <span> from undefined to true');
19
20 spellcheck_test(
21 '<span contenteditable id="target"></span>',
22 document => {
23 const target = document.getElementById('target');
24 target.spellcheck = false;
25 target.focus();
26 document.execCommand('insertText', false, 'Hello,');
27 document.execCommand('insertText', false, 'zz.');
28 },
29 '<span contenteditable id="target" spellcheck="false">Hello,zz.</span>',
30 'Change "spellcheck" of <span> from undefined to false');
31
32 spellcheck_test(
33 '<span contenteditable id="target" spellcheck="true"></span>',
34 document => {
35 const target = document.getElementById('target');
36 target.spellcheck = true;
37 target.focus();
38 document.execCommand('insertText', false, 'Hello,');
39 document.execCommand('insertText', false, 'zz.');
40 },
41 '<span contenteditable id="target" spellcheck="true">Hello,#zz#.</span>',
42 'Change "spellcheck" of <span> from true to true');
43
44 spellcheck_test(
45 '<span contenteditable id="target" spellcheck="true"></span>',
46 document => {
47 const target = document.getElementById('target');
48 target.spellcheck = false;
49 target.focus();
50 document.execCommand('insertText', false, 'Hello,');
51 document.execCommand('insertText', false, 'zz.');
52 },
53 '<span contenteditable id="target" spellcheck="false">Hello,zz.</span>',
54 'Change "spellcheck" of <span> from true to false');
55
56 spellcheck_test(
57 '<span contenteditable id="target" spellcheck="false"></span>',
58 document => {
59 const target = document.getElementById('target');
60 target.spellcheck = true;
61 target.focus();
62 document.execCommand('insertText', false, 'Hello,');
63 document.execCommand('insertText', false, 'zz.');
64 },
65 '<span contenteditable id="target" spellcheck="true">Hello,#zz#.</span>',
66 'Change "spellcheck" of <span> from false to true');
67
68 spellcheck_test(
69 '<span contenteditable id="target" spellcheck="false"></span>',
70 document => {
71 const target = document.getElementById('target');
72 target.spellcheck = false;
73 target.focus();
74 document.execCommand('insertText', false, 'Hello,');
75 document.execCommand('insertText', false, 'zz.');
76 },
77 '<span contenteditable id="target" spellcheck="false">Hello,zz.</span>',
78 'Change "spellcheck" of <span> from false to false');
79
80 spellcheck_test(
81 '<input id="target">',
82 document => {
83 const target = document.getElementById('target');
84 target.spellcheck = true;
85 target.focus();
86 document.execCommand('insertText', false, 'Hello,');
87 document.execCommand('insertText', false, 'zz.');
88 },
89 '<input id="target" spellcheck="true" value="Hello,#zz#.">',
90 'Change "spellcheck" of <input> from undefined to true');
91
92 spellcheck_test(
93 '<input id="target">',
94 document => {
95 const target = document.getElementById('target');
96 target.spellcheck = false;
97 target.focus();
98 document.execCommand('insertText', false, 'Hello,');
99 document.execCommand('insertText', false, 'zz.');
100 },
101 '<input id="target" spellcheck="false" value="Hello,zz.">',
102 'Change "spellcheck" of <input> from undefined to false');
103
104 spellcheck_test(
105 '<input id="target" spellcheck="true">',
106 document => {
107 const target = document.getElementById('target');
108 target.spellcheck = true;
109 target.focus();
110 document.execCommand('insertText', false, 'Hello,');
111 document.execCommand('insertText', false, 'zz.');
112 },
113 '<input id="target" spellcheck="true" value="Hello,#zz#.">',
114 'Change "spellcheck" of <input> from true to true');
115
116 spellcheck_test(
117 '<input id="target" spellcheck="true">',
118 document => {
119 const target = document.getElementById('target');
120 target.spellcheck = false;
121 target.focus();
122 document.execCommand('insertText', false, 'Hello,');
123 document.execCommand('insertText', false, 'zz.');
124 },
125 '<input id="target" spellcheck="false" value="Hello,zz.">',
126 'Change "spellcheck" of <input> from true to false');
127
128 spellcheck_test(
129 '<input id="target" spellcheck="false">',
130 document => {
131 const target = document.getElementById('target');
132 target.spellcheck = true;
133 target.focus();
134 document.execCommand('insertText', false, 'Hello,');
135 document.execCommand('insertText', false, 'zz.');
136 },
137 '<input id="target" spellcheck="true" value="Hello,#zz#.">',
138 'Change "spellcheck" of <input> from false to true');
139
140 spellcheck_test(
141 '<input id="target" spellcheck="false">',
142 document => {
143 const target = document.getElementById('target');
144 target.spellcheck = false;
145 target.focus();
146 document.execCommand('insertText', false, 'Hello,');
147 document.execCommand('insertText', false, 'zz.');
148 },
149 '<input id="target" spellcheck="false" value="Hello,zz.">',
150 'Change "spellcheck" of <input> from false to false');
151
152 spellcheck_test(
153 '<textarea id="target"></textarea>',
154 document => {
155 const target = document.getElementById('target');
156 target.spellcheck = true;
157 target.focus();
158 document.execCommand('insertText', false, 'Hello,');
159 document.execCommand('insertText', false, 'zz.');
160 },
161 '<textarea id="target" spellcheck="true">Hello,#zz#.</textarea>',
162 'Change "spellcheck" of <textarea> from undefined to true');
163
164 spellcheck_test(
165 '<textarea id="target"></textarea>',
166 document => {
167 const target = document.getElementById('target');
168 target.spellcheck = false;
169 target.focus();
170 document.execCommand('insertText', false, 'Hello,');
171 document.execCommand('insertText', false, 'zz.');
172 },
173 '<textarea id="target" spellcheck="false">Hello,zz.</textarea>',
174 'Change "spellcheck" of <textarea> from undefined to false');
175
176 spellcheck_test(
177 '<textarea id="target" spellcheck="true"></textarea>',
178 document => {
179 const target = document.getElementById('target');
180 target.spellcheck = true;
181 target.focus();
182 document.execCommand('insertText', false, 'Hello,');
183 document.execCommand('insertText', false, 'zz.');
184 },
185 '<textarea id="target" spellcheck="true">Hello,#zz#.</textarea>',
186 'Change "spellcheck" of <textarea> from true to true');
187
188 spellcheck_test(
189 '<textarea id="target" spellcheck="true"></textarea>',
190 document => {
191 const target = document.getElementById('target');
192 target.spellcheck = false;
193 target.focus();
194 document.execCommand('insertText', false, 'Hello,');
195 document.execCommand('insertText', false, 'zz.');
196 },
197 '<textarea id="target" spellcheck="false">Hello,zz.</textarea>',
198 'Change "spellcheck" of <textarea> from true to false');
199
200 spellcheck_test(
201 '<textarea id="target" spellcheck="false"></textarea>',
202 document => {
203 const target = document.getElementById('target');
204 target.spellcheck = true;
205 target.focus();
206 document.execCommand('insertText', false, 'Hello,');
207 document.execCommand('insertText', false, 'zz.');
208 },
209 '<textarea id="target" spellcheck="true">Hello,#zz#.</textarea>',
210 'Change "spellcheck" of <textarea> from false to true');
211
212 spellcheck_test(
213 '<textarea id="target" spellcheck="false"></textarea>',
214 document => {
215 const target = document.getElementById('target');
216 target.spellcheck = false;
217 target.focus();
218 document.execCommand('insertText', false, 'Hello,');
219 document.execCommand('insertText', false, 'zz.');
220 },
221 '<textarea id="target" spellcheck="false">Hello,zz.</textarea>',
222 'Change "spellcheck" of <textarea> from false to false');
223 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698