| 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/common.js"></script> | 5 <script src="../../forms/resources/common.js"></script> |
| 6 <script src="../../forms/resources/picker-common.js"></script> | 6 <script src="../../forms/resources/picker-common.js"></script> |
| 7 <script src="resources/calendar-picker-common.js"></script> | 7 <script src="resources/calendar-picker-common.js"></script> |
| 8 </head> | 8 </head> |
| 9 <body> | 9 <body> |
| 10 <p id="description"></p> | 10 <p id="description"></p> |
| 11 <div id="console"></div> | 11 <div id="console"></div> |
| 12 <input type=month id=month value="2000-01"> | 12 <input type=month id=month value="2000-01"> |
| 13 <script> | 13 <script> |
| 14 description("Tests if month picker mouse operations work as expected."); | 14 description("Tests if month picker mouse operations work as expected."); |
| 15 | 15 |
| 16 debug('Check that page popup doesn\'t exist at first.'); | 16 debug('Check that page popup doesn\'t exist at first.'); |
| 17 shouldBeNull('document.getElementById("mock-page-popup")'); | 17 shouldBeNull('document.getElementById("mock-page-popup")'); |
| 18 | 18 |
| 19 openPicker(document.getElementById('month'), test); | 19 openPickerWithMock(document.getElementById('month'), test); |
| 20 | 20 |
| 21 function test() { | 21 function test() { |
| 22 shouldBeEqualToString('currentMonth()', '2000-01'); | 22 shouldBeEqualToString('currentMonth()', '2000-01'); |
| 23 shouldBeEqualToString('selectedValue()', '2000-01'); | 23 shouldBeEqualToString('selectedValue()', '2000-01'); |
| 24 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'); | 24 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'); |
| 25 shouldBeEqualToString('highlightedValue()', '2000-01'); | 25 shouldBeEqualToString('highlightedValue()', '2000-01'); |
| 26 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'); | 26 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'); |
| 27 | 27 |
| 28 debug('Check that hovering over an entry highlights it.'); | 28 debug('Check that hovering over an entry highlights it.'); |
| 29 hoverOverDayCellAt(0, 0); | 29 hoverOverDayCellAt(0, 0); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 clickMonthButton(1999, 5); | 114 clickMonthButton(1999, 5); |
| 115 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); | 115 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); |
| 116 shouldBeEqualToString('currentMonth()', '1999-06'); | 116 shouldBeEqualToString('currentMonth()', '1999-06'); |
| 117 | 117 |
| 118 finishJSTest(); | 118 finishJSTest(); |
| 119 } | 119 } |
| 120 </script> | 120 </script> |
| 121 </body> | 121 </body> |
| 122 </html> | 122 </html> |
| OLD | NEW |