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

Unified Diff: LayoutTests/platform/chromium/fast/forms/calendar-picker/month-picker-key-operations.html

Issue 14120003: Move LayoutTests from platform/chromium/... to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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
Index: LayoutTests/platform/chromium/fast/forms/calendar-picker/month-picker-key-operations.html
diff --git a/LayoutTests/platform/chromium/fast/forms/calendar-picker/month-picker-key-operations.html b/LayoutTests/platform/chromium/fast/forms/calendar-picker/month-picker-key-operations.html
deleted file mode 100644
index 22742be1e4c205766d64e560d580dadaba34841b..0000000000000000000000000000000000000000
--- a/LayoutTests/platform/chromium/fast/forms/calendar-picker/month-picker-key-operations.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../../../../fast/forms/resources/picker-common.js"></script>
-<script src="resources/calendar-picker-common.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<input type=month id=month value="2000-01">
-<script>
-description("Tests if month picker key bindings work as expected.");
-
-debug('Check that page popup doesn\'t exist at first.');
-shouldBeNull('document.getElementById("mock-page-popup")');
-
-openPicker(document.getElementById('month'), test1);
-
-function test1() {
- debug('Check that page popup exists.');
- shouldBe('popupWindow.pagePopupController.toString()', '"[object PagePopupController]"');
-
- shouldBeFalse('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-01');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19,2000-01-20,2000-01-21,2000-01-22,2000-01-23,2000-01-24,2000-01-25,2000-01-26,2000-01-27,2000-01-28,2000-01-29,2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-01');
- shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-01-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19,2000-01-20,2000-01-21,2000-01-22,2000-01-23,2000-01-24,2000-01-25,2000-01-26,2000-01-27,2000-01-28,2000-01-29,2000-01-30,2000-01-31');
-
- debug('Check that arrow keys work properly.');
-
- debug("press up");
- eventSender.keyDown('upArrow');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '1999-12');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-01');
- shouldBeEqualToString('highlightedValue()', '1999-12');
- shouldBeEqualToString('highlightedDayCells()', '1999-12-01,1999-12-02,1999-12-03,1999-12-04,1999-12-05,1999-12-06,1999-12-07,1999-12-08,1999-12-09,1999-12-10,1999-12-11,1999-12-12,1999-12-13,1999-12-14,1999-12-15,1999-12-16,1999-12-17,1999-12-18,1999-12-19,1999-12-20,1999-12-21,1999-12-22,1999-12-23,1999-12-24,1999-12-25,1999-12-26,1999-12-27,1999-12-28,1999-12-29,1999-12-30,1999-12-31');
-
- debug("press down");
- eventSender.keyDown('downArrow');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-01');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19,2000-01-20,2000-01-21,2000-01-22,2000-01-23,2000-01-24,2000-01-25,2000-01-26,2000-01-27,2000-01-28,2000-01-29,2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-01');
- shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-01-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19,2000-01-20,2000-01-21,2000-01-22,2000-01-23,2000-01-24,2000-01-25,2000-01-26,2000-01-27,2000-01-28,2000-01-29,2000-01-30,2000-01-31');
-
- debug("press down");
- eventSender.keyDown('downArrow');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
-
- debug("press left");
- eventSender.keyDown('leftArrow');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-01');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19,2000-01-20,2000-01-21,2000-01-22,2000-01-23,2000-01-24,2000-01-25,2000-01-26,2000-01-27,2000-01-28,2000-01-29,2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-01');
- shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-01-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19,2000-01-20,2000-01-21,2000-01-22,2000-01-23,2000-01-24,2000-01-25,2000-01-26,2000-01-27,2000-01-28,2000-01-29,2000-01-30,2000-01-31');
-
- debug("press right");
- eventSender.keyDown('rightArrow');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
-
- debug("press pageDown");
- eventSender.keyDown('pageDown');
- shouldBeEqualToString('currentMonth()', '2000-03');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-27,2000-02-28,2000-02-29');
-
- debug("press pageUp");
- eventSender.keyDown('pageUp');
- shouldBeEqualToString('currentMonth()', '2000-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
-
- debug("press m");
- eventSender.keyDown('m');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-03');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '');
- shouldBeEqualToString('highlightedValue()', '2000-03');
- shouldBeEqualToString('highlightedDayCells()', '2000-03-01,2000-03-02,2000-03-03,2000-03-04,2000-03-05,2000-03-06,2000-03-07,2000-03-08,2000-03-09,2000-03-10,2000-03-11,2000-03-12,2000-03-13,2000-03-14,2000-03-15,2000-03-16,2000-03-17,2000-03-18,2000-03-19,2000-03-20,2000-03-21,2000-03-22,2000-03-23,2000-03-24,2000-03-25,2000-03-26,2000-03-27,2000-03-28,2000-03-29,2000-03-30,2000-03-31');
-
- debug("press shift + m");
- eventSender.keyDown('M');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
-
- debug("press y");
- eventSender.keyDown('y');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2001-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '');
- shouldBeEqualToString('highlightedValue()', '2001-02');
- shouldBeEqualToString('highlightedDayCells()', '2001-02-01,2001-02-02,2001-02-03,2001-02-04,2001-02-05,2001-02-06,2001-02-07,2001-02-08,2001-02-09,2001-02-10,2001-02-11,2001-02-12,2001-02-13,2001-02-14,2001-02-15,2001-02-16,2001-02-17,2001-02-18,2001-02-19,2001-02-20,2001-02-21,2001-02-22,2001-02-23,2001-02-24,2001-02-25,2001-02-26,2001-02-27,2001-02-28');
-
- debug("press shift + y");
- eventSender.keyDown('Y');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
-
- debug("press d");
- eventSender.keyDown('d');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2010-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '');
- shouldBeEqualToString('highlightedValue()', '2010-02');
- shouldBeEqualToString('highlightedDayCells()', '2010-02-01,2010-02-02,2010-02-03,2010-02-04,2010-02-05,2010-02-06,2010-02-07,2010-02-08,2010-02-09,2010-02-10,2010-02-11,2010-02-12,2010-02-13,2010-02-14,2010-02-15,2010-02-16,2010-02-17,2010-02-18,2010-02-19,2010-02-20,2010-02-21,2010-02-22,2010-02-23,2010-02-24,2010-02-25,2010-02-26,2010-02-27,2010-02-28');
-
- debug("press shift + d");
- eventSender.keyDown('D');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()');
- shouldBeEqualToString('currentMonth()', '2000-02');
- shouldBeEqualToString('selectedValue()', '2000-01');
- shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
-
- debug("press enter");
- eventSender.keyDown('\n');
- shouldBeEqualToString('currentMonth()', '2000-02');
- shouldBeEqualToString('selectedValue()', '2000-02');
- shouldBeEqualToString('selectedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-02-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2000-02-18,2000-02-19,2000-02-20,2000-02-21,2000-02-22,2000-02-23,2000-02-24,2000-02-25,2000-02-26,2000-02-27,2000-02-28,2000-02-29');
- shouldBe('document.getElementById("month").value', '"2000-02"');
-
- debug('Check if tabbing works.');
- shouldBe('focusedElement()', '".list-view calendar-table-view"');
- eventSender.keyDown('\t', ['shiftKey']);
- shouldBe('focusedElement()', '".calendar-navigation-button"');
- eventSender.keyDown('\t', ['shiftKey']);
- shouldBe('focusedElement()', '".calendar-navigation-button today-button"');
- eventSender.keyDown('\t', ['shiftKey']);
- shouldBe('focusedElement()', '".calendar-navigation-button"');
- eventSender.keyDown('\t', ['shiftKey']);
- shouldBe('focusedElement()', '".month-popup-button"');
-
- debug('open the month popup');
- eventSender.keyDown('\n');
- shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible');
- shouldBeEqualToString('highlightedMonthButton()', '2000-02');
-
- debug("press down");
- eventSender.keyDown('downArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-06');
-
- debug("press right");
- eventSender.keyDown('rightArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-07');
-
- debug("press right");
- eventSender.keyDown('rightArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-08');
-
- debug("press right");
- eventSender.keyDown('rightArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-09');
-
- debug("press right");
- eventSender.keyDown('rightArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-10');
-
- debug("press right");
- eventSender.keyDown('rightArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-11');
-
- debug("press left");
- eventSender.keyDown('leftArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-10');
-
- debug("press up");
- eventSender.keyDown('upArrow');
- shouldBeEqualToString('highlightedMonthButton()', '2000-06');
-
- debug("press pageDown");
- eventSender.keyDown('pageDown');
- shouldBeEqualToString('highlightedMonthButton()', '2001-06');
-
- debug("press pageUp");
- eventSender.keyDown('pageUp');
- shouldBeEqualToString('highlightedMonthButton()', '2000-06');
-
- debug('select month in the month popup');
- eventSender.keyDown('\n');
- shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible');
- shouldBeEqualToString('currentMonth()', '2000-06');
- shouldBeEqualToString('selectedValue()', '2000-02');
- shouldBeEqualToString('selectedDayCells()', '');
- shouldBeEqualToString('highlightedValue()', '2000-02');
- shouldBeEqualToString('highlightedDayCells()', '');
-
- debug("focus calendar table");
- popupWindow.global.picker.calendarTableView.element.focus();
-
- // Test twice in case midnight.
- debug("press t");
- shouldBeTrue('testToday() || testToday()');
-
- debug("press esc");
- eventSender.keyDown('\x1B');
- waitUntilClosing(test2AfterClosing);
-}
-
-function test2AfterClosing() {
- shouldBeNull('document.getElementById("mock-page-popup")');
-
- finishJSTest();
-}
-
-function testToday() {
- eventSender.keyDown('t');
- shouldBeTrue('isCalendarTableScrollingWithAnimation()', true /* quiet */);
- var now = new Date();
- var expectedMonth = new popupWindow.Month(now.getFullYear(), now.getMonth()).toString();
- return selectedValue() === expectedMonth && highlightedValue() === expectedMonth && currentMonth() === expectedMonth;
-}
-
-function focusedElement() {
- var element = popupWindow.document.activeElement;
- if (!element)
- return null;
- var identifier = "." + element.className;
- if (element.value)
- identifier += "[value=" + element.value + "]";
- return identifier;
-}
-
-</script>
-<script src="../../../../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698