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

Side by Side Diff: LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations.html

Issue 556323003: Calendar Picker: Make month popup cells non-focusable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <script src="../../forms/resources/picker-common.js"></script> 5 <script src="../../forms/resources/picker-common.js"></script>
6 <script src="resources/calendar-picker-common.js"></script> 6 <script src="resources/calendar-picker-common.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <p id="description"></p> 9 <p id="description"></p>
10 <div id="console"></div> 10 <div id="console"></div>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 eventSender.keyDown('\t', ['shiftKey']); 179 eventSender.keyDown('\t', ['shiftKey']);
180 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); 180 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button');
181 eventSender.keyDown('\t', ['shiftKey']); 181 eventSender.keyDown('\t', ['shiftKey']);
182 shouldBeEqualToString('focusedElement()', '.month-popup-button'); 182 shouldBeEqualToString('focusedElement()', '.month-popup-button');
183 183
184 debug('open the month popup'); 184 debug('open the month popup');
185 eventSender.keyDown('\n'); 185 eventSender.keyDown('\n');
186 shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible'); 186 shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible');
187 shouldBeEqualToString('highlightedMonthButton()', '1999-12'); 187 shouldBeEqualToString('highlightedMonthButton()', '1999-12');
188 188
189 debug('TAB shouldn\'t change focus');
190 shouldBeEqualToString('focusedElement()', '.list-view year-list-view');
191 eventSender.keyDown('\t');
192 // With the MockPagePopup, an elemenet not in the popup is focused.
193 shouldBeTrue('focusedElement().indexOf("month-button") < 0');
194 shouldBeTrue('focusedElement().indexOf("list-cell") < 0');
195 eventSender.keyDown('\t', ['shiftKey']);
196 shouldBeEqualToString('focusedElement()', '.list-view year-list-view');
197
189 debug("press down"); 198 debug("press down");
190 eventSender.keyDown('downArrow'); 199 eventSender.keyDown('downArrow');
191 shouldBeEqualToString('highlightedMonthButton()', '2000-04'); 200 shouldBeEqualToString('highlightedMonthButton()', '2000-04');
192 201
193 debug("press right"); 202 debug("press right");
194 eventSender.keyDown('rightArrow'); 203 eventSender.keyDown('rightArrow');
195 shouldBeEqualToString('highlightedMonthButton()', '2000-05'); 204 shouldBeEqualToString('highlightedMonthButton()', '2000-05');
196 205
197 debug("press right"); 206 debug("press right");
198 eventSender.keyDown('rightArrow'); 207 eventSender.keyDown('rightArrow');
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return yearString + "-" + ("0" + (month + 1)).substr(-2, 2) + "-" + ("0" + d ay).substr(-2, 2); 282 return yearString + "-" + ("0" + (month + 1)).substr(-2, 2) + "-" + ("0" + d ay).substr(-2, 2);
274 } 283 }
275 284
276 function focusedElement() { 285 function focusedElement() {
277 var element = popupWindow.document.activeElement; 286 var element = popupWindow.document.activeElement;
278 if (!element) 287 if (!element)
279 return null; 288 return null;
280 var identifier = "." + element.className; 289 var identifier = "." + element.className;
281 if (element.value) 290 if (element.value)
282 identifier += "[value=" + element.value + "]"; 291 identifier += "[value=" + element.value + "]";
292 if (identifier == ".")
293 return elementIdentifier(element);
294 return identifier;
295 }
296
297 function elementIdentifier(element) {
298 var identifier = element.parentElement ? (elementIdentifier(element.parentEl ement) + " ") : "";
299 identifier += element.tagName;
300 if (element.className)
301 identifier += "." + element.className.replace(/ +/g, ".");
302 if (element.value)
303 identifier += "[value=" + element.value + "]";
283 return identifier; 304 return identifier;
284 } 305 }
285 306
286 </script> 307 </script>
287 </body> 308 </body>
288 </html> 309 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698