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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations.html
diff --git a/LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations.html b/LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations.html
index 6b010cf92450e414f1db38f9f2d625f237ccea08..01b810cc4fa7512c66325c5272cd2a9750137cdc 100644
--- a/LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations.html
+++ b/LayoutTests/fast/forms/calendar-picker/calendar-picker-key-operations.html
@@ -186,6 +186,15 @@ function test2() {
shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible');
shouldBeEqualToString('highlightedMonthButton()', '1999-12');
+ debug('TAB shouldn\'t change focus');
+ shouldBeEqualToString('focusedElement()', '.list-view year-list-view');
+ eventSender.keyDown('\t');
+ // With the MockPagePopup, an elemenet not in the popup is focused.
+ shouldBeTrue('focusedElement().indexOf("month-button") < 0');
+ shouldBeTrue('focusedElement().indexOf("list-cell") < 0');
+ eventSender.keyDown('\t', ['shiftKey']);
+ shouldBeEqualToString('focusedElement()', '.list-view year-list-view');
+
debug("press down");
eventSender.keyDown('downArrow');
shouldBeEqualToString('highlightedMonthButton()', '2000-04');
@@ -280,6 +289,18 @@ function focusedElement() {
var identifier = "." + element.className;
if (element.value)
identifier += "[value=" + element.value + "]";
+ if (identifier == ".")
+ return elementIdentifier(element);
+ return identifier;
+}
+
+function elementIdentifier(element) {
+ var identifier = element.parentElement ? (elementIdentifier(element.parentElement) + " ") : "";
+ identifier += element.tagName;
+ if (element.className)
+ identifier += "." + element.className.replace(/ +/g, ".");
+ if (element.value)
+ identifier += "[value=" + element.value + "]";
return identifier;
}
« 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