| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../../../fast/js/resources/js-test-pre.js"></script> | |
| 5 <script src="../../../../../fast/forms/resources/picker-common.js"></script> | |
| 6 <script src="resources/calendar-picker-common.js"></script> | |
| 7 </head> | |
| 8 <body> | |
| 9 <p id="description"></p> | |
| 10 <div id="console"></div> | |
| 11 | |
| 12 <input type=date id=date value="2011-05-01" step="9"> | |
| 13 | |
| 14 <script> | |
| 15 description('Test if step limits available dates in calendar picker.'); | |
| 16 | |
| 17 openPicker(document.getElementById('date'), test1); | |
| 18 | |
| 19 function test1() { | |
| 20 debug("Step without min."); | |
| 21 shouldBeEqualToString('availableDayCells()', '2011-05-08,2011-05-17,2011-05-
26,2011-06-04'); | |
| 22 | |
| 23 // Close popup | |
| 24 eventSender.keyDown('\x1B'); | |
| 25 waitUntilClosing(test1AfterClose); | |
| 26 } | |
| 27 | |
| 28 function test1AfterClose() { | |
| 29 document.getElementById('date').min = "2011-05-01"; | |
| 30 | |
| 31 // Reopen popup | |
| 32 openPicker(document.getElementById('date'), test2); | |
| 33 } | |
| 34 | |
| 35 function test2() { | |
| 36 debug("Step when min is set."); | |
| 37 shouldBeEqualToString('availableDayCells()', '2011-05-01,2011-05-10,2011-05-
19,2011-05-28'); | |
| 38 finishJSTest(); | |
| 39 } | |
| 40 </script> | |
| 41 <script src="../../../../../fast/js/resources/js-test-post.js"></script> | |
| 42 </body> | |
| 43 </html> | |
| OLD | NEW |