| 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=week id=week value="2000-W01"> | 12 <input type=week id=week value="2000-W01"> |
| 13 <script> | 13 <script> |
| 14 description("Tests if week picker mouse operations work as expected."); | 14 description("Tests if week 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('week'), test); | 19 openPickerWithMock(document.getElementById('week'), test); |
| 20 | 20 |
| 21 function test() { | 21 function test() { |
| 22 shouldBeEqualToString('currentMonth()', '2000-01'); | 22 shouldBeEqualToString('currentMonth()', '2000-01'); |
| 23 shouldBeEqualToString('selectedValue()', '2000-W01'); | 23 shouldBeEqualToString('selectedValue()', '2000-W01'); |
| 24 shouldBeEqualToString('selectedDayCells()', '2000-01-03,2000-01-04,2000-01-0
5,2000-01-06,2000-01-07,2000-01-08,2000-01-09'); | 24 shouldBeEqualToString('selectedDayCells()', '2000-01-03,2000-01-04,2000-01-0
5,2000-01-06,2000-01-07,2000-01-08,2000-01-09'); |
| 25 shouldBeEqualToString('highlightedValue()', '2000-W01'); | 25 shouldBeEqualToString('highlightedValue()', '2000-W01'); |
| 26 shouldBeEqualToString('highlightedDayCells()', '2000-01-03,2000-01-04,2000-0
1-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09'); | 26 shouldBeEqualToString('highlightedDayCells()', '2000-01-03,2000-01-04,2000-0
1-05,2000-01-06,2000-01-07,2000-01-08,2000-01-09'); |
| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 clickMonthButton(1999, 5); | 122 clickMonthButton(1999, 5); |
| 123 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); | 123 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); |
| 124 shouldBeEqualToString('currentMonth()', '1999-06'); | 124 shouldBeEqualToString('currentMonth()', '1999-06'); |
| 125 | 125 |
| 126 finishJSTest(); | 126 finishJSTest(); |
| 127 } | 127 } |
| 128 </script> | 128 </script> |
| 129 </body> | 129 </body> |
| 130 </html> | 130 </html> |
| OLD | NEW |