| OLD | NEW |
| 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 13 matching lines...) Expand all Loading... |
| 24 shouldBeFalse('isCalendarTableScrollingWithAnimation()'); | 24 shouldBeFalse('isCalendarTableScrollingWithAnimation()'); |
| 25 shouldBeEqualToString('currentMonth()', '2000-01'); | 25 shouldBeEqualToString('currentMonth()', '2000-01'); |
| 26 shouldBeEqualToString('selectedValue()', '2000-01'); | 26 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 27 shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-0
3,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2
000-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'); | 27 shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-0
3,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2
000-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'); |
| 28 shouldBeEqualToString('highlightedValue()', '2000-01'); | 28 shouldBeEqualToString('highlightedValue()', '2000-01'); |
| 29 shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-0
1-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-1
0,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2
000-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'); | 29 shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-0
1-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-1
0,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2
000-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'); |
| 30 | 30 |
| 31 debug('Check that arrow keys work properly.'); | 31 debug('Check that arrow keys work properly.'); |
| 32 | 32 |
| 33 debug("press up"); | 33 debug("press up"); |
| 34 eventSender.keyDown('upArrow'); | 34 eventSender.keyDown('ArrowUp'); |
| 35 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 35 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 36 shouldBeEqualToString('currentMonth()', '1999-12'); | 36 shouldBeEqualToString('currentMonth()', '1999-12'); |
| 37 shouldBeEqualToString('selectedValue()', '2000-01'); | 37 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 38 shouldBeEqualToString('selectedDayCells()', '2000-01-01'); | 38 shouldBeEqualToString('selectedDayCells()', '2000-01-01'); |
| 39 shouldBeEqualToString('highlightedValue()', '1999-12'); | 39 shouldBeEqualToString('highlightedValue()', '1999-12'); |
| 40 shouldBeEqualToString('highlightedDayCells()', '1999-12-01,1999-12-02,1999-1
2-03,1999-12-04,1999-12-05,1999-12-06,1999-12-07,1999-12-08,1999-12-09,1999-12-1
0,1999-12-11,1999-12-12,1999-12-13,1999-12-14,1999-12-15,1999-12-16,1999-12-17,1
999-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'); | 40 shouldBeEqualToString('highlightedDayCells()', '1999-12-01,1999-12-02,1999-1
2-03,1999-12-04,1999-12-05,1999-12-06,1999-12-07,1999-12-08,1999-12-09,1999-12-1
0,1999-12-11,1999-12-12,1999-12-13,1999-12-14,1999-12-15,1999-12-16,1999-12-17,1
999-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'); |
| 41 | 41 |
| 42 debug("press down"); | 42 debug("press down"); |
| 43 eventSender.keyDown('downArrow'); | 43 eventSender.keyDown('ArrowDown'); |
| 44 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 44 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 45 shouldBeEqualToString('currentMonth()', '2000-01'); | 45 shouldBeEqualToString('currentMonth()', '2000-01'); |
| 46 shouldBeEqualToString('selectedValue()', '2000-01'); | 46 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 47 shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-0
3,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2
000-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'); | 47 shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-0
3,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2
000-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'); |
| 48 shouldBeEqualToString('highlightedValue()', '2000-01'); | 48 shouldBeEqualToString('highlightedValue()', '2000-01'); |
| 49 shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-0
1-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-1
0,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2
000-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'); | 49 shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-0
1-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-1
0,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2
000-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'); |
| 50 | 50 |
| 51 debug("press down"); | 51 debug("press down"); |
| 52 eventSender.keyDown('downArrow'); | 52 eventSender.keyDown('ArrowDown'); |
| 53 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 53 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 54 shouldBeEqualToString('currentMonth()', '2000-02'); | 54 shouldBeEqualToString('currentMonth()', '2000-02'); |
| 55 shouldBeEqualToString('selectedValue()', '2000-01'); | 55 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 56 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); | 56 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); |
| 57 shouldBeEqualToString('highlightedValue()', '2000-02'); | 57 shouldBeEqualToString('highlightedValue()', '2000-02'); |
| 58 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); | 58 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); |
| 59 | 59 |
| 60 debug("press left"); | 60 debug("press left"); |
| 61 eventSender.keyDown('leftArrow'); | 61 eventSender.keyDown('ArrowLeft'); |
| 62 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 62 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 63 shouldBeEqualToString('currentMonth()', '2000-01'); | 63 shouldBeEqualToString('currentMonth()', '2000-01'); |
| 64 shouldBeEqualToString('selectedValue()', '2000-01'); | 64 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 65 shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-0
3,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2
000-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'); | 65 shouldBeEqualToString('selectedDayCells()', '2000-01-01,2000-01-02,2000-01-0
3,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-10,2
000-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'); |
| 66 shouldBeEqualToString('highlightedValue()', '2000-01'); | 66 shouldBeEqualToString('highlightedValue()', '2000-01'); |
| 67 shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-0
1-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-1
0,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2
000-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'); | 67 shouldBeEqualToString('highlightedDayCells()', '2000-01-01,2000-01-02,2000-0
1-03,2000-01-04,2000-01-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09,2000-01-1
0,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2
000-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'); |
| 68 | 68 |
| 69 debug("press right"); | 69 debug("press right"); |
| 70 eventSender.keyDown('rightArrow'); | 70 eventSender.keyDown('ArrowRight'); |
| 71 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 71 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 72 shouldBeEqualToString('currentMonth()', '2000-02'); | 72 shouldBeEqualToString('currentMonth()', '2000-02'); |
| 73 shouldBeEqualToString('selectedValue()', '2000-01'); | 73 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 74 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); | 74 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); |
| 75 shouldBeEqualToString('highlightedValue()', '2000-02'); | 75 shouldBeEqualToString('highlightedValue()', '2000-02'); |
| 76 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); | 76 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); |
| 77 | 77 |
| 78 debug("press pageDown"); | 78 debug("press PageDown"); |
| 79 eventSender.keyDown('pageDown'); | 79 eventSender.keyDown('PageDown'); |
| 80 shouldBeEqualToString('currentMonth()', '2000-03'); | 80 shouldBeEqualToString('currentMonth()', '2000-03'); |
| 81 shouldBeEqualToString('selectedValue()', '2000-01'); | 81 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 82 shouldBeEqualToString('selectedDayCells()', ''); | 82 shouldBeEqualToString('selectedDayCells()', ''); |
| 83 shouldBeEqualToString('highlightedValue()', '2000-02'); | 83 shouldBeEqualToString('highlightedValue()', '2000-02'); |
| 84 shouldBeEqualToString('highlightedDayCells()', '2000-02-27,2000-02-28,2000-0
2-29'); | 84 shouldBeEqualToString('highlightedDayCells()', '2000-02-27,2000-02-28,2000-0
2-29'); |
| 85 | 85 |
| 86 debug("press pageUp"); | 86 debug("press PageUp"); |
| 87 eventSender.keyDown('pageUp'); | 87 eventSender.keyDown('PageUp'); |
| 88 shouldBeEqualToString('currentMonth()', '2000-02'); | 88 shouldBeEqualToString('currentMonth()', '2000-02'); |
| 89 shouldBeEqualToString('selectedValue()', '2000-01'); | 89 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 90 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); | 90 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); |
| 91 shouldBeEqualToString('highlightedValue()', '2000-02'); | 91 shouldBeEqualToString('highlightedValue()', '2000-02'); |
| 92 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); | 92 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); |
| 93 | 93 |
| 94 debug("press m"); | 94 debug("press m"); |
| 95 eventSender.keyDown('m'); | 95 eventSender.keyDown('m'); |
| 96 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 96 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 97 shouldBeEqualToString('currentMonth()', '2000-03'); | 97 shouldBeEqualToString('currentMonth()', '2000-03'); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 eventSender.keyDown('D'); | 140 eventSender.keyDown('D'); |
| 141 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 141 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 142 shouldBeEqualToString('currentMonth()', '2000-02'); | 142 shouldBeEqualToString('currentMonth()', '2000-02'); |
| 143 shouldBeEqualToString('selectedValue()', '2000-01'); | 143 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 144 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); | 144 shouldBeEqualToString('selectedDayCells()', '2000-01-30,2000-01-31'); |
| 145 shouldBeEqualToString('highlightedValue()', '2000-02'); | 145 shouldBeEqualToString('highlightedValue()', '2000-02'); |
| 146 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); | 146 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); |
| 147 | 147 |
| 148 debug("press enter"); | 148 debug("press enter"); |
| 149 setNoCloseOnCommit(); | 149 setNoCloseOnCommit(); |
| 150 eventSender.keyDown('\n'); | 150 eventSender.keyDown('Enter'); |
| 151 shouldBeEqualToString('currentMonth()', '2000-02'); | 151 shouldBeEqualToString('currentMonth()', '2000-02'); |
| 152 shouldBeEqualToString('selectedValue()', '2000-02'); | 152 shouldBeEqualToString('selectedValue()', '2000-02'); |
| 153 shouldBeEqualToString('selectedDayCells()', '2000-02-01,2000-02-02,2000-02-0
3,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2
000-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'); | 153 shouldBeEqualToString('selectedDayCells()', '2000-02-01,2000-02-02,2000-02-0
3,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-10,2
000-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'); |
| 154 shouldBeEqualToString('highlightedValue()', '2000-02'); | 154 shouldBeEqualToString('highlightedValue()', '2000-02'); |
| 155 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); | 155 shouldBeEqualToString('highlightedDayCells()', '2000-02-01,2000-02-02,2000-0
2-03,2000-02-04,2000-02-05,2000-02-06,2000-02-07,2000-02-08,2000-02-09,2000-02-1
0,2000-02-11,2000-02-12,2000-02-13,2000-02-14,2000-02-15,2000-02-16,2000-02-17,2
000-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'); |
| 156 shouldBeEqualToString('document.getElementById("month").value', '2000-02'); | 156 shouldBeEqualToString('document.getElementById("month").value', '2000-02'); |
| 157 | 157 |
| 158 debug('Check if tabbing works.'); | 158 debug('Check if tabbing works.'); |
| 159 shouldBeEqualToString('focusedElement()', '.list-view calendar-table-view'); | 159 shouldBeEqualToString('focusedElement()', '.list-view calendar-table-view'); |
| 160 eventSender.keyDown('\t', ['shiftKey']); | 160 eventSender.keyDown('Tab', ['shiftKey']); |
| 161 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); | 161 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); |
| 162 eventSender.keyDown('\t', ['shiftKey']); | 162 eventSender.keyDown('Tab', ['shiftKey']); |
| 163 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button today
-button'); | 163 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button today
-button'); |
| 164 eventSender.keyDown('\t', ['shiftKey']); | 164 eventSender.keyDown('Tab', ['shiftKey']); |
| 165 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); | 165 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); |
| 166 eventSender.keyDown('\t', ['shiftKey']); | 166 eventSender.keyDown('Tab', ['shiftKey']); |
| 167 shouldBeEqualToString('focusedElement()', '.month-popup-button'); | 167 shouldBeEqualToString('focusedElement()', '.month-popup-button'); |
| 168 | 168 |
| 169 debug('open the month popup'); | 169 debug('open the month popup'); |
| 170 eventSender.keyDown('\n'); | 170 eventSender.keyDown('Enter'); |
| 171 shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible'); | 171 shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible'); |
| 172 shouldBeEqualToString('highlightedMonthButton()', '2000-02'); | 172 shouldBeEqualToString('highlightedMonthButton()', '2000-02'); |
| 173 | 173 |
| 174 debug("press down"); | 174 debug("press down"); |
| 175 eventSender.keyDown('downArrow'); | 175 eventSender.keyDown('ArrowDown'); |
| 176 shouldBeEqualToString('highlightedMonthButton()', '2000-06'); | 176 shouldBeEqualToString('highlightedMonthButton()', '2000-06'); |
| 177 | 177 |
| 178 debug("press right"); | 178 debug("press right"); |
| 179 eventSender.keyDown('rightArrow'); | 179 eventSender.keyDown('ArrowRight'); |
| 180 shouldBeEqualToString('highlightedMonthButton()', '2000-07'); | 180 shouldBeEqualToString('highlightedMonthButton()', '2000-07'); |
| 181 | 181 |
| 182 debug("press right"); | 182 debug("press right"); |
| 183 eventSender.keyDown('rightArrow'); | 183 eventSender.keyDown('ArrowRight'); |
| 184 shouldBeEqualToString('highlightedMonthButton()', '2000-08'); | 184 shouldBeEqualToString('highlightedMonthButton()', '2000-08'); |
| 185 | 185 |
| 186 debug("press right"); | 186 debug("press right"); |
| 187 eventSender.keyDown('rightArrow'); | 187 eventSender.keyDown('ArrowRight'); |
| 188 shouldBeEqualToString('highlightedMonthButton()', '2000-09'); | 188 shouldBeEqualToString('highlightedMonthButton()', '2000-09'); |
| 189 | 189 |
| 190 debug("press right"); | 190 debug("press right"); |
| 191 eventSender.keyDown('rightArrow'); | 191 eventSender.keyDown('ArrowRight'); |
| 192 shouldBeEqualToString('highlightedMonthButton()', '2000-10'); | 192 shouldBeEqualToString('highlightedMonthButton()', '2000-10'); |
| 193 | 193 |
| 194 debug("press right"); | 194 debug("press right"); |
| 195 eventSender.keyDown('rightArrow'); | 195 eventSender.keyDown('ArrowRight'); |
| 196 shouldBeEqualToString('highlightedMonthButton()', '2000-11'); | 196 shouldBeEqualToString('highlightedMonthButton()', '2000-11'); |
| 197 | 197 |
| 198 debug("press left"); | 198 debug("press left"); |
| 199 eventSender.keyDown('leftArrow'); | 199 eventSender.keyDown('ArrowLeft'); |
| 200 shouldBeEqualToString('highlightedMonthButton()', '2000-10'); | 200 shouldBeEqualToString('highlightedMonthButton()', '2000-10'); |
| 201 | 201 |
| 202 debug("press up"); | 202 debug("press up"); |
| 203 eventSender.keyDown('upArrow'); | 203 eventSender.keyDown('ArrowUp'); |
| 204 shouldBeEqualToString('highlightedMonthButton()', '2000-06'); | 204 shouldBeEqualToString('highlightedMonthButton()', '2000-06'); |
| 205 | 205 |
| 206 debug("press pageDown"); | 206 debug("press PageDown"); |
| 207 eventSender.keyDown('pageDown'); | 207 eventSender.keyDown('PageDown'); |
| 208 shouldBeEqualToString('highlightedMonthButton()', '2001-06'); | 208 shouldBeEqualToString('highlightedMonthButton()', '2001-06'); |
| 209 | 209 |
| 210 debug("press pageUp"); | 210 debug("press PageUp"); |
| 211 eventSender.keyDown('pageUp'); | 211 eventSender.keyDown('PageUp'); |
| 212 shouldBeEqualToString('highlightedMonthButton()', '2000-06'); | 212 shouldBeEqualToString('highlightedMonthButton()', '2000-06'); |
| 213 | 213 |
| 214 debug('select month in the month popup'); | 214 debug('select month in the month popup'); |
| 215 eventSender.keyDown('\n'); | 215 eventSender.keyDown('Enter'); |
| 216 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); | 216 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); |
| 217 shouldBeEqualToString('currentMonth()', '2000-06'); | 217 shouldBeEqualToString('currentMonth()', '2000-06'); |
| 218 shouldBeEqualToString('selectedValue()', '2000-02'); | 218 shouldBeEqualToString('selectedValue()', '2000-02'); |
| 219 shouldBeEqualToString('selectedDayCells()', ''); | 219 shouldBeEqualToString('selectedDayCells()', ''); |
| 220 shouldBeEqualToString('highlightedValue()', '2000-02'); | 220 shouldBeEqualToString('highlightedValue()', '2000-02'); |
| 221 shouldBeEqualToString('highlightedDayCells()', ''); | 221 shouldBeEqualToString('highlightedDayCells()', ''); |
| 222 | 222 |
| 223 debug("focus calendar table"); | 223 debug("focus calendar table"); |
| 224 popupWindow.global.picker.calendarTableView.element.focus(); | 224 popupWindow.global.picker.calendarTableView.element.focus(); |
| 225 | 225 |
| 226 // Test twice in case midnight. | 226 // Test twice in case midnight. |
| 227 debug("press t"); | 227 debug("press t"); |
| 228 shouldBeTrue('testToday() || testToday()'); | 228 shouldBeTrue('testToday() || testToday()'); |
| 229 | 229 |
| 230 debug("press esc"); | 230 debug("press esc"); |
| 231 eventSender.keyDown('escape'); | 231 eventSender.keyDown('Escape'); |
| 232 waitUntilClosing(test2AfterClosing); | 232 waitUntilClosing(test2AfterClosing); |
| 233 } | 233 } |
| 234 | 234 |
| 235 function test2AfterClosing() { | 235 function test2AfterClosing() { |
| 236 shouldBeNull('document.getElementById("mock-page-popup")'); | 236 shouldBeNull('document.getElementById("mock-page-popup")'); |
| 237 | 237 |
| 238 finishJSTest(); | 238 finishJSTest(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 function testToday() { | 241 function testToday() { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 252 return null; | 252 return null; |
| 253 var identifier = "." + element.className; | 253 var identifier = "." + element.className; |
| 254 if (element.value) | 254 if (element.value) |
| 255 identifier += "[value=" + element.value + "]"; | 255 identifier += "[value=" + element.value + "]"; |
| 256 return identifier; | 256 return identifier; |
| 257 } | 257 } |
| 258 | 258 |
| 259 </script> | 259 </script> |
| 260 </body> | 260 </body> |
| 261 </html> | 261 </html> |
| OLD | NEW |