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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events.html

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos Created 4 years, 6 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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <p> 8 <p>
9 Please run this with DumpRenderTree. 9 Please run this with DumpRenderTree.
10 </p> 10 </p>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 keyDown('4'); // -> 02/03/[0044] --:-- -- 69 keyDown('4'); // -> 02/03/[0044] --:-- --
70 keyDown('0'); // -> 02/03/0044 [00]:-- -- 70 keyDown('0'); // -> 02/03/0044 [00]:-- --
71 keyDown('5'); // -> 02/03/0044 05:[--] -- 71 keyDown('5'); // -> 02/03/0044 05:[--] --
72 keyDown('0'); // -> 02/03/0044 01:[01] -- 72 keyDown('0'); // -> 02/03/0044 01:[01] --
73 keyDown('6'); // -> 02/03/0044 05:06 [--] 73 keyDown('6'); // -> 02/03/0044 05:06 [--]
74 keyDown('A'); // -> 02/03/0044 05:06 AM 74 keyDown('A'); // -> 02/03/0044 05:06 AM
75 shouldBeEqualToString('input.value', '0044-02-03T05:06'); 75 shouldBeEqualToString('input.value', '0044-02-03T05:06');
76 76
77 beginTest('Digit keys and backspace key'); 77 beginTest('Digit keys and backspace key');
78 keyDown('1'); // -> [01]/dd/yyyy --:-- -- 78 keyDown('1'); // -> [01]/dd/yyyy --:-- --
79 keyDown("\b"); // -> [mm]/20/2012 --:-- -- 79 keyDown("Backspace"); // -> [mm]/20/2012 --:-- --
80 keyDown('5'); // -> 05/[dd]/yyyy --:-- -- 80 keyDown('5'); // -> 05/[dd]/yyyy --:-- --
81 keyDown('6'); // -> 05/06/[yyyy] --:-- -- 81 keyDown('6'); // -> 05/06/[yyyy] --:-- --
82 keyDown("\b"); // -> 05/06/[yyyy] --:-- -- 82 keyDown("Backspace"); // -> 05/06/[yyyy] --:-- --
83 keyDown('7'); // -> 05/06/[0007] --:-- -- 83 keyDown('7'); // -> 05/06/[0007] --:-- --
84 keyDown("\b"); // -> 05/06/[yyyy] --:-- -- 84 keyDown("Backspace"); // -> 05/06/[yyyy] --:-- --
85 keyDown('8'); // -> 05/06/[0008] --:-- -- 85 keyDown('8'); // -> 05/06/[0008] --:-- --
86 keyDown('rightArrow'); // -> 05/06/0008 [--]:-- -- 86 keyDown('ArrowRight'); // -> 05/06/0008 [--]:-- --
87 keyDown('9'); // -> 05/06/0008 09:[--] -- 87 keyDown('9'); // -> 05/06/0008 09:[--] --
88 keyDown('1'); // -> 05/06/0008 09:[01] -- 88 keyDown('1'); // -> 05/06/0008 09:[01] --
89 keyDown('0'); // -> 05/06/0008 09:10 [--] 89 keyDown('0'); // -> 05/06/0008 09:10 [--]
90 keyDown('A'); // -> 05/06/0008 09:10 [AM] 90 keyDown('A'); // -> 05/06/0008 09:10 [AM]
91 shouldBeEqualToString('input.value', '0008-05-06T09:10'); 91 shouldBeEqualToString('input.value', '0008-05-06T09:10');
92 92
93 beginTest('Left/Right keys', '2012-09-29T00:00'); 93 beginTest('Left/Right keys', '2012-09-29T00:00');
94 keyDown('rightArrow'); // -> 09/[29]/2012 12:00 AM 94 keyDown('ArrowRight'); // -> 09/[29]/2012 12:00 AM
95 keyDown('5'); // -> 09/05/[2012] 12:00 AM 95 keyDown('5'); // -> 09/05/[2012] 12:00 AM
96 keyDown('rightArrow'); // -> 09/05/2012 [12]:00 AM 96 keyDown('ArrowRight'); // -> 09/05/2012 [12]:00 AM
97 keyDown('7'); // -> 09/05/2012 07:[00] AM 97 keyDown('7'); // -> 09/05/2012 07:[00] AM
98 keyDown('rightArrow'); // -> 09/05/2012 07:00 [AM] 98 keyDown('ArrowRight'); // -> 09/05/2012 07:00 [AM]
99 keyDown('P'); // -> 09/05/2012 07:00 [PM] 99 keyDown('P'); // -> 09/05/2012 07:00 [PM]
100 keyDown('leftArrow'); // -> 09/05/2012 07:[00] PM 100 keyDown('ArrowLeft'); // -> 09/05/2012 07:[00] PM
101 keyDown('5'); // -> 09/05/2012 07:[05] PM 101 keyDown('5'); // -> 09/05/2012 07:[05] PM
102 keyDown('leftArrow'); // -> 09/05/2012 [07]:05 PM 102 keyDown('ArrowLeft'); // -> 09/05/2012 [07]:05 PM
103 keyDown('leftArrow'); // -> 09/05/[2012] 07:05 PM 103 keyDown('ArrowLeft'); // -> 09/05/[2012] 07:05 PM
104 keyDown('4'); // -> 09/05/[0004] 07:05 PM 104 keyDown('4'); // -> 09/05/[0004] 07:05 PM
105 shouldBeEqualToString('input.value', '0004-09-05T19:05'); 105 shouldBeEqualToString('input.value', '0004-09-05T19:05');
106 keyDown('leftArrow'); // -> 09/[05]/0004 07:05 PM 106 keyDown('ArrowLeft'); // -> 09/[05]/0004 07:05 PM
107 keyDown('leftArrow'); // -> [09]/05/0004 07:05 PM 107 keyDown('ArrowLeft'); // -> [09]/05/0004 07:05 PM
108 keyDown('leftArrow'); // -> [09]/05/0004 07:05 PM 108 keyDown('ArrowLeft'); // -> [09]/05/0004 07:05 PM
109 shouldBeEqualToString('document.activeElement.id', 'input'); 109 shouldBeEqualToString('document.activeElement.id', 'input');
110 110
111 beginTest('Up/Down keys', '2012-09-29T00:00'); 111 beginTest('Up/Down keys', '2012-09-29T00:00');
112 keyDown('upArrow'); // -> [10]/29/2012 12:00 AM 112 keyDown('ArrowUp'); // -> [10]/29/2012 12:00 AM
113 shouldBeEqualToString('input.value', '2012-10-29T00:00'); 113 shouldBeEqualToString('input.value', '2012-10-29T00:00');
114 keyDown('downArrow'); // -> [09]/29/2012 12:00 AM 114 keyDown('ArrowDown'); // -> [09]/29/2012 12:00 AM
115 keyDown('downArrow'); // -> [08]/29/2012 12:00 AM 115 keyDown('ArrowDown'); // -> [08]/29/2012 12:00 AM
116 shouldBeEqualToString('input.value', '2012-08-29T00:00'); 116 shouldBeEqualToString('input.value', '2012-08-29T00:00');
117 117
118 beginTest('Up/Down keys on empty value'); 118 beginTest('Up/Down keys on empty value');
119 keyDown('downArrow'); // -> [12]/dd/yyyy --:-- -- 119 keyDown('ArrowDown'); // -> [12]/dd/yyyy --:-- --
120 keyDown('downArrow'); // -> [11]/dd/yyyy --:-- -- 120 keyDown('ArrowDown'); // -> [11]/dd/yyyy --:-- --
121 keyDown('rightArrow'); // -> 11/[dd]/yyyy --:-- -- 121 keyDown('ArrowRight'); // -> 11/[dd]/yyyy --:-- --
122 keyDown('upArrow'); // -> 11/[01]/yyyy --:-- -- 122 keyDown('ArrowUp'); // -> 11/[01]/yyyy --:-- --
123 keyDown('upArrow'); // -> 11/[02]/yyyy --:-- -- 123 keyDown('ArrowUp'); // -> 11/[02]/yyyy --:-- --
124 keyDown('downArrow'); // -> 11/[01]/yyyy --:-- -- 124 keyDown('ArrowDown'); // -> 11/[01]/yyyy --:-- --
125 keyDown('rightArrow'); // -> 11/01/[yyyy] --:-- -- 125 keyDown('ArrowRight'); // -> 11/01/[yyyy] --:-- --
126 var currentYear = new Date().getFullYear(); 126 var currentYear = new Date().getFullYear();
127 keyDown('upArrow'); // -> 11/01/[currentYear] --:-- -- 127 keyDown('ArrowUp'); // -> 11/01/[currentYear] --:-- --
128 keyDown('rightArrow'); // -> 11/01/currentYear [--]:-- -- 128 keyDown('ArrowRight'); // -> 11/01/currentYear [--]:-- --
129 keyDown('upArrow'); // -> 11/01/currentYear [01]:-- -- 129 keyDown('ArrowUp'); // -> 11/01/currentYear [01]:-- --
130 keyDown('rightArrow'); // -> 11/01/currentYear 01:[--] -- 130 keyDown('ArrowRight'); // -> 11/01/currentYear 01:[--] --
131 keyDown('downArrow'); // -> 11/01/currentYear 01:[59] -- 131 keyDown('ArrowDown'); // -> 11/01/currentYear 01:[59] --
132 keyDown('rightArrow'); // -> 11/01/currentYear 01:59 [--] 132 keyDown('ArrowRight'); // -> 11/01/currentYear 01:59 [--]
133 keyDown('upArrow'); // -> 11/01/currentYear 01:59 [AM] 133 keyDown('ArrowUp'); // -> 11/01/currentYear 01:59 [AM]
134 shouldBe('input.value', 'currentYear + "-11-01T01:59"'); 134 shouldBe('input.value', 'currentYear + "-11-01T01:59"');
135 135
136 beginTest('Tab key', '2012-09-30T00:00'); 136 beginTest('Tab key', '2012-09-30T00:00');
137 keyDown('\t'); // -> 09/[30]/2012 12:00 AM 137 keyDown('\t'); // -> 09/[30]/2012 12:00 AM
138 keyDown('5'); // -> 09/05/[2012] 12:00 AM 138 keyDown('5'); // -> 09/05/[2012] 12:00 AM
139 keyDown('\t'); // -> 09/05/2012 [12]:00 AM 139 keyDown('\t'); // -> 09/05/2012 [12]:00 AM
140 keyDown('\t'); // -> 09/05/2012 12:[00] AM 140 keyDown('\t'); // -> 09/05/2012 12:[00] AM
141 keyDown('\t'); // -> 09/05/2012 12:00 [AM] 141 keyDown('\t'); // -> 09/05/2012 12:00 [AM]
142 keyDown('P'); // -> 09/05/2012 12:00 [PM] 142 keyDown('P'); // -> 09/05/2012 12:00 [PM]
143 shouldBeEqualToString('input.value', '2012-09-05T12:00'); 143 shouldBeEqualToString('input.value', '2012-09-05T12:00');
144 keyDown('\t'); // -> Focus out. 144 keyDown('\t'); // -> Focus out.
145 shouldBeEqualToString('document.activeElement.id', 'after'); 145 shouldBeEqualToString('document.activeElement.id', 'after');
146 146
147 beginTest('Shfit+Tab key', '2012-09-30T01:00'); 147 beginTest('Shfit+Tab key', '2012-09-30T01:00');
148 after.focus(); 148 after.focus();
149 keyDown('\t', ['shiftKey']); // -> 09/30/2012 01:00 [AM] 149 keyDown('\t', ['shiftKey']); // -> 09/30/2012 01:00 [AM]
150 keyDown('P'); // -> 09/30/2012 01:00 [PM] 150 keyDown('P'); // -> 09/30/2012 01:00 [PM]
151 keyDown('\t', ['shiftKey']); // -> 09/30/2012 01:[00] PM 151 keyDown('\t', ['shiftKey']); // -> 09/30/2012 01:[00] PM
152 keyDown('3'); // -> 09/30/2012 01:[03] PM 152 keyDown('3'); // -> 09/30/2012 01:[03] PM
153 shouldBeEqualToString('input.value', '2012-09-30T13:03'); 153 shouldBeEqualToString('input.value', '2012-09-30T13:03');
154 keyDown('\t', ['shiftKey']); // -> 09/30/2012 [01]:03 PM 154 keyDown('\t', ['shiftKey']); // -> 09/30/2012 [01]:03 PM
155 keyDown('\t', ['shiftKey']); // -> 09/30/[2012] 01:03 PM 155 keyDown('\t', ['shiftKey']); // -> 09/30/[2012] 01:03 PM
156 keyDown('\t', ['shiftKey']); // -> 09/[30]/2012 01:03 PM 156 keyDown('\t', ['shiftKey']); // -> 09/[30]/2012 01:03 PM
157 keyDown('\t', ['shiftKey']); // -> [09]/30/2012 01:03 PM 157 keyDown('\t', ['shiftKey']); // -> [09]/30/2012 01:03 PM
158 keyDown('\t', ['shiftKey']); // -> Focus out. 158 keyDown('\t', ['shiftKey']); // -> Focus out.
159 shouldBeEqualToString('document.activeElement.id', 'before'); 159 shouldBeEqualToString('document.activeElement.id', 'before');
160 160
161 beginTest('Up key on maximum value', '275760-09-13T00:00'); 161 beginTest('Up key on maximum value', '275760-09-13T00:00');
162 keyDown('upArrow'); // -> [10]/13/275760 12:00 AM 162 keyDown('ArrowUp'); // -> [10]/13/275760 12:00 AM
163 keyDown('\t'); // -> 10/[13]/275760 12:00 AM 163 keyDown('\t'); // -> 10/[13]/275760 12:00 AM
164 keyDown('upArrow'); // -> 10/[14]/275760 12:00 AM 164 keyDown('ArrowUp'); // -> 10/[14]/275760 12:00 AM
165 keyDown('\t'); // -> 10/14/[275760] 12:00 AM 165 keyDown('\t'); // -> 10/14/[275760] 12:00 AM
166 keyDown('upArrow'); // -> 10/14/[0001] 12:00 AM 166 keyDown('ArrowUp'); // -> 10/14/[0001] 12:00 AM
167 shouldBeEqualToString('input.value', '0001-10-14T00:00'); 167 shouldBeEqualToString('input.value', '0001-10-14T00:00');
168 beginTest('Up key with a maximum attribute', '1999-12-31T00:00', '1000-01-01T00: 00', '1999-12-31T23:59'); 168 beginTest('Up key with a maximum attribute', '1999-12-31T00:00', '1000-01-01T00: 00', '1999-12-31T23:59');
169 keyDown('upArrow'); // -> [01]/31/1999 12:00 AM 169 keyDown('ArrowUp'); // -> [01]/31/1999 12:00 AM
170 keyDown('\t'); // -> 01/[31]/1999 12:00 AM 170 keyDown('\t'); // -> 01/[31]/1999 12:00 AM
171 keyDown('upArrow'); // -> 01/[01]/1999 12:00 AM 171 keyDown('ArrowUp'); // -> 01/[01]/1999 12:00 AM
172 keyDown('\t'); // -> 01/01/[1999] 12:00 AM 172 keyDown('\t'); // -> 01/01/[1999] 12:00 AM
173 keyDown('upArrow'); // -> 01/01/[1000] 12:00 AM 173 keyDown('ArrowUp'); // -> 01/01/[1000] 12:00 AM
174 shouldBeEqualToString('input.value', '1000-01-01T00:00'); 174 shouldBeEqualToString('input.value', '1000-01-01T00:00');
175 175
176 beginTest('Down key on minimum value', '0001-01-01T00:00', 'bad min', 'wrong max '); 176 beginTest('Down key on minimum value', '0001-01-01T00:00', 'bad min', 'wrong max ');
177 keyDown('downArrow'); // -> [12]/01/0001 12:00 AM 177 keyDown('ArrowDown'); // -> [12]/01/0001 12:00 AM
178 keyDown('\t'); // -> 12/[01]/0001 12:00 AM 178 keyDown('\t'); // -> 12/[01]/0001 12:00 AM
179 keyDown('downArrow'); // -> 12/[31]/0001 12:00 AM 179 keyDown('ArrowDown'); // -> 12/[31]/0001 12:00 AM
180 keyDown('\t'); // -> 12/31/[0001] 12:00 AM 180 keyDown('\t'); // -> 12/31/[0001] 12:00 AM
181 keyDown('downArrow'); // -> 12/31/[275760] 12:00 AM, which is greater than the h ard limit. 181 keyDown('ArrowDown'); // -> 12/31/[275760] 12:00 AM, which is greater than the h ard limit.
182 shouldBeEqualToString('input.value', ''); 182 shouldBeEqualToString('input.value', '');
183 beginTest('Down key with a minimum attribute', '1000-01-01T00:00', '1000-01-01T0 0:00'); 183 beginTest('Down key with a minimum attribute', '1000-01-01T00:00', '1000-01-01T0 0:00');
184 keyDown('downArrow'); // -> [12]/01/1000 12:00 AM 184 keyDown('ArrowDown'); // -> [12]/01/1000 12:00 AM
185 keyDown('\t'); // -> 12/[01]/1000 12:00 AM 185 keyDown('\t'); // -> 12/[01]/1000 12:00 AM
186 keyDown('downArrow'); // -> 12/[31]/1000 12:00 AM 186 keyDown('ArrowDown'); // -> 12/[31]/1000 12:00 AM
187 keyDown('\t'); // -> 12/31/[1000] 12:00 AM 187 keyDown('\t'); // -> 12/31/[1000] 12:00 AM
188 keyDown('downArrow'); // -> 12/31/275760, which is greater than the hard limit. 188 keyDown('ArrowDown'); // -> 12/31/275760, which is greater than the hard limit.
189 shouldBeEqualToString('input.value', ''); 189 shouldBeEqualToString('input.value', '');
190 190
191 beginTest('Inconsistent min-max attributes', '1999-12-31T23:59', '1999-12-31T23: 59', '1000-01-01T00:00'); 191 beginTest('Inconsistent min-max attributes', '1999-12-31T23:59', '1999-12-31T23: 59', '1000-01-01T00:00');
192 keyDown('\t'); // -> 12/[31]/1999 11:59 PM 192 keyDown('\t'); // -> 12/[31]/1999 11:59 PM
193 keyDown('\t'); // -> 12/31/[1999] 11:59 PM 193 keyDown('\t'); // -> 12/31/[1999] 11:59 PM
194 keyDown('upArrow'); // -> 12/31/[1000] 11:59 PM. 1000 is the swapped minimum ye ar. 194 keyDown('ArrowUp'); // -> 12/31/[1000] 11:59 PM. 1000 is the swapped minimum ye ar.
195 shouldBeEqualToString('input.value', '1000-12-31T23:59'); 195 shouldBeEqualToString('input.value', '1000-12-31T23:59');
196 keyDown('downArrow'); // -> 12/31/[1999] 196 keyDown('ArrowDown'); // -> 12/31/[1999]
197 shouldBeEqualToString('input.value', '1999-12-31T23:59'); 197 shouldBeEqualToString('input.value', '1999-12-31T23:59');
198 198
199 beginTest('Make an invalid date', '2012-02-01T00:00'); 199 beginTest('Make an invalid date', '2012-02-01T00:00');
200 keyDown('\t'); // -> 02/[01]/2012 12:00 AM 200 keyDown('\t'); // -> 02/[01]/2012 12:00 AM
201 keyDown('downArrow'); // -> 02/[31]/2012 12:00 AM 201 keyDown('ArrowDown'); // -> 02/[31]/2012 12:00 AM
202 shouldBeEqualToString('input.value', ''); // 2012-02-31 is not a valid date. 202 shouldBeEqualToString('input.value', ''); // 2012-02-31 is not a valid date.
203 203
204 beginTest('Backspace key', '2012-09-20T00:00'); 204 beginTest('Backspace key', '2012-09-20T00:00');
205 keyDown('\b'); // -> [mm]/20/2012 12:00 AM 205 keyDown('Backspace'); // -> [mm]/20/2012 12:00 AM
206 shouldBeEqualToString('input.value', ''); 206 shouldBeEqualToString('input.value', '');
207 207
208 beginTest('Delete key', '2012-09-30T00:00'); 208 beginTest('Delete key', '2012-09-30T00:00');
209 keyDown('delete'); // -> [mm]/30/2012 12:00 AM 209 keyDown('Delete'); // -> [mm]/30/2012 12:00 AM
210 shouldBeEqualToString('input.value', ''); 210 shouldBeEqualToString('input.value', '');
211 211
212 beginTest('Typeahead', '2012-12-31T00:00'); 212 beginTest('Typeahead', '2012-12-31T00:00');
213 keyDown('rightArrow'); // -> 12/[31]/2012 12:00 AM 213 keyDown('ArrowRight'); // -> 12/[31]/2012 12:00 AM
214 keyDown('1'); // -> 12/[01]/2012 12:00 AM 214 keyDown('1'); // -> 12/[01]/2012 12:00 AM
215 shouldBeEqualToString('input.value', '2012-12-01T00:00'); 215 shouldBeEqualToString('input.value', '2012-12-01T00:00');
216 keyDown('leftArrow'); // -> [12]/01/2012 12:00 AM 216 keyDown('ArrowLeft'); // -> [12]/01/2012 12:00 AM
217 keyDown('rightArrow'); // -> 12/[01]/2012 12:00 AM 217 keyDown('ArrowRight'); // -> 12/[01]/2012 12:00 AM
218 keyDown('2'); // -> 12/[02]/2012 12:00 AM 218 keyDown('2'); // -> 12/[02]/2012 12:00 AM
219 shouldBeEqualToString('input.value', '2012-12-02T00:00'); 219 shouldBeEqualToString('input.value', '2012-12-02T00:00');
220 220
221 input.setAttribute('lang', 'he-il'); 221 input.setAttribute('lang', 'he-il');
222 beginTest('RTL focus navigation', '2012-09-28T23:00'); 222 beginTest('RTL focus navigation', '2012-09-28T23:00');
223 debug('The tests in this block fail on platforms without the lang-attribute-awar e-form-control-UI feature.'); 223 debug('The tests in this block fail on platforms without the lang-attribute-awar e-form-control-UI feature.');
224 // The logicla order: dd/MM/yyyy hh:mm 224 // The logicla order: dd/MM/yyyy hh:mm
225 // The visual order: hh:mm dd/MM/yyyy 225 // The visual order: hh:mm dd/MM/yyyy
226 keyDown('1'); // -> 23:00 [01]/09/2012 226 keyDown('1'); // -> 23:00 [01]/09/2012
227 shouldBeEqualToString('input.value', '2012-09-01T23:00'); 227 shouldBeEqualToString('input.value', '2012-09-01T23:00');
228 keyDown('\t'); // -> 23:00 01/[09]/2012 228 keyDown('\t'); // -> 23:00 01/[09]/2012
229 keyDown('2'); // -> 23:00 01/02/[2012] 229 keyDown('2'); // -> 23:00 01/02/[2012]
230 keyDown('\t'); // -> [23]:00 2012/09/01 230 keyDown('\t'); // -> [23]:00 2012/09/01
231 keyDown('1'); // -> [01]:00 01/09/2012 231 keyDown('1'); // -> [01]:00 01/09/2012
232 shouldBeEqualToString('input.value', '2012-02-01T01:00'); 232 shouldBeEqualToString('input.value', '2012-02-01T01:00');
233 keyDown('\t', ['shiftKey']); // -> 01:00 01/09/[2012] 233 keyDown('\t', ['shiftKey']); // -> 01:00 01/09/[2012]
234 keyDown('8'); // -> 01:00 01/09/[0008] 234 keyDown('8'); // -> 01:00 01/09/[0008]
235 keyDown('\t', ['shiftKey']); // -> 01:00 01/[09]/0008 235 keyDown('\t', ['shiftKey']); // -> 01:00 01/[09]/0008
236 keyDown('3'); // -> 01:00 01/03/[0008] 236 keyDown('3'); // -> 01:00 01/03/[0008]
237 shouldBeEqualToString('input.value', '0008-03-01T01:00'); 237 shouldBeEqualToString('input.value', '0008-03-01T01:00');
238 input.removeAttribute('lang'); 238 input.removeAttribute('lang');
239 239
240 beginTest('Disabled/readonly', '2012-10-08T00:00'); 240 beginTest('Disabled/readonly', '2012-10-08T00:00');
241 input.disabled = true; 241 input.disabled = true;
242 keyDown('upArrow'); // 10/08/2012 12:00 AM 242 keyDown('ArrowUp'); // 10/08/2012 12:00 AM
243 shouldBeEqualToString('input.value', '2012-10-08T00:00'); 243 shouldBeEqualToString('input.value', '2012-10-08T00:00');
244 input.disabled = false; 244 input.disabled = false;
245 input.focus(); 245 input.focus();
246 keyDown('upArrow'); // [11]/08/2012 12:00 AM 246 keyDown('ArrowUp'); // [11]/08/2012 12:00 AM
247 shouldBeEqualToString('input.value', '2012-11-08T00:00'); 247 shouldBeEqualToString('input.value', '2012-11-08T00:00');
248 input.readOnly = true; 248 input.readOnly = true;
249 keyDown('upArrow'); // 11/08/2012 12:00 AM 249 keyDown('ArrowUp'); // 11/08/2012 12:00 AM
250 shouldBeEqualToString('input.value', '2012-11-08T00:00'); 250 shouldBeEqualToString('input.value', '2012-11-08T00:00');
251 input.readOnly = false; 251 input.readOnly = false;
252 input.focus(); 252 input.focus();
253 keyDown('upArrow'); // [12]/08/2012 12:00 AM 253 keyDown('ArrowUp'); // [12]/08/2012 12:00 AM
254 shouldBeEqualToString('input.value', '2012-12-08T00:00'); 254 shouldBeEqualToString('input.value', '2012-12-08T00:00');
255 255
256 </script> 256 </script>
257 </body> 257 </body>
258 </html> 258 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698