| 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 calendar picker mouse operations work as expected."); | 14 description("Tests if calendar 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 var position; | 21 var position; |
| 22 eventSender.clearTouchPoints(); | 22 eventSender.clearTouchPoints(); |
| 23 | 23 |
| 24 function test() { | 24 function test() { |
| 25 debug('Open the month popup.'); | 25 debug('Open the month popup.'); |
| 26 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); | 26 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); |
| 27 clickMonthPopupButton(); | 27 clickMonthPopupButton(); |
| 28 shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible'); | 28 shouldBeTrue('popupWindow.global.picker.monthPopupView.isVisible'); |
| 29 | 29 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 function testAfterSwipingUp() { | 65 function testAfterSwipingUp() { |
| 66 shouldBeTrue('checkYearListViewScrollOffset() < 0'); | 66 shouldBeTrue('checkYearListViewScrollOffset() < 0'); |
| 67 popupWindow.global.picker.monthPopupView.yearListView.element.removeEventLis
tener('touchend', testAfterSwipingUp, false); | 67 popupWindow.global.picker.monthPopupView.yearListView.element.removeEventLis
tener('touchend', testAfterSwipingUp, false); |
| 68 finishJSTest(); | 68 finishJSTest(); |
| 69 } | 69 } |
| 70 </script> | 70 </script> |
| 71 </body> | 71 </body> |
| 72 </html> | 72 </html> |
| OLD | NEW |