| 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> |
| 11 | 11 |
| 12 <input type=month id=month value="2011-04" step="9" min="2011-04"> | 12 <input type=month id=month value="2011-04" step="9" min="2011-04"> |
| 13 | 13 |
| 14 <script> | 14 <script> |
| 15 description('Test if step limits available dates in month picker.'); | 15 description('Test if step limits available dates in month picker.'); |
| 16 | 16 |
| 17 openPicker(document.getElementById('month'), test1); | 17 openPicker(document.getElementById('month'), test1); |
| 18 | 18 |
| 19 function test1() { | 19 function test1() { |
| 20 debug("Step without min."); | 20 debug("Step without min."); |
| 21 shouldBeEqualToString('availableDayCells()', '2011-04-01,2011-04-02,2011-04-
03,2011-04-04,2011-04-05,2011-04-06,2011-04-07,2011-04-08,2011-04-09,2011-04-10,
2011-04-11,2011-04-12,2011-04-13,2011-04-14,2011-04-15,2011-04-16,2011-04-17,201
1-04-18,2011-04-19,2011-04-20,2011-04-21,2011-04-22,2011-04-23,2011-04-24,2011-0
4-25,2011-04-26,2011-04-27,2011-04-28,2011-04-29,2011-04-30'); | 21 shouldBeEqualToString('availableDayCells()', '2011-04-01,2011-04-02,2011-04-
03,2011-04-04,2011-04-05,2011-04-06,2011-04-07,2011-04-08,2011-04-09,2011-04-10,
2011-04-11,2011-04-12,2011-04-13,2011-04-14,2011-04-15,2011-04-16,2011-04-17,201
1-04-18,2011-04-19,2011-04-20,2011-04-21,2011-04-22,2011-04-23,2011-04-24,2011-0
4-25,2011-04-26,2011-04-27,2011-04-28,2011-04-29,2011-04-30'); |
| 22 | 22 |
| 23 // Close popup | 23 // Close popup |
| 24 eventSender.keyDown('\x1B'); | 24 eventSender.keyDown('escape'); |
| 25 | 25 |
| 26 document.getElementById('month').min = "2011-05"; | 26 document.getElementById('month').min = "2011-05"; |
| 27 document.getElementById('month').value = "2012-02"; | 27 document.getElementById('month').value = "2012-02"; |
| 28 | 28 |
| 29 waitUntilClosing(test1AfterClosing); | 29 waitUntilClosing(test1AfterClosing); |
| 30 } | 30 } |
| 31 | 31 |
| 32 function test1AfterClosing() { | 32 function test1AfterClosing() { |
| 33 // Reopen popup | 33 // Reopen popup |
| 34 openPicker(document.getElementById('month'), test2); | 34 openPicker(document.getElementById('month'), test2); |
| 35 } | 35 } |
| 36 | 36 |
| 37 function test2() { | 37 function test2() { |
| 38 debug("Step when min is set."); | 38 debug("Step when min is set."); |
| 39 shouldBeEqualToString('availableDayCells()', '2012-02-01,2012-02-02,2012-02-
03,2012-02-04,2012-02-05,2012-02-06,2012-02-07,2012-02-08,2012-02-09,2012-02-10,
2012-02-11,2012-02-12,2012-02-13,2012-02-14,2012-02-15,2012-02-16,2012-02-17,201
2-02-18,2012-02-19,2012-02-20,2012-02-21,2012-02-22,2012-02-23,2012-02-24,2012-0
2-25,2012-02-26,2012-02-27,2012-02-28,2012-02-29'); | 39 shouldBeEqualToString('availableDayCells()', '2012-02-01,2012-02-02,2012-02-
03,2012-02-04,2012-02-05,2012-02-06,2012-02-07,2012-02-08,2012-02-09,2012-02-10,
2012-02-11,2012-02-12,2012-02-13,2012-02-14,2012-02-15,2012-02-16,2012-02-17,201
2-02-18,2012-02-19,2012-02-20,2012-02-21,2012-02-22,2012-02-23,2012-02-24,2012-0
2-25,2012-02-26,2012-02-27,2012-02-28,2012-02-29'); |
| 40 finishJSTest(); | 40 finishJSTest(); |
| 41 } | 41 } |
| 42 </script> | 42 </script> |
| 43 </body> | 43 </body> |
| 44 </html> | 44 </html> |
| OLD | NEW |