| 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/suggestion-picker-common.js"></script> | 6 <script src="resources/suggestion-picker-common.js"></script> |
| 7 </head> | 7 </head> |
| 8 <body style="background-color: #bbbbbb;"> | 8 <body style="background-color: #bbbbbb;"> |
| 9 <p id="description"></p> | 9 <p id="description"></p> |
| 10 <div id="console"></div> | 10 <div id="console"></div> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 popupWindow.focus(); | 41 popupWindow.focus(); |
| 42 | 42 |
| 43 shouldBe('entryValues().length', '6'); | 43 shouldBe('entryValues().length', '6'); |
| 44 shouldBeEqualToString('entryValues()[0]', '2012-01'); | 44 shouldBeEqualToString('entryValues()[0]', '2012-01'); |
| 45 shouldBeEqualToString('entryValues()[1]', '2012-03'); | 45 shouldBeEqualToString('entryValues()[1]', '2012-03'); |
| 46 shouldBeEqualToString('entryValues()[2]', '2012-05'); | 46 shouldBeEqualToString('entryValues()[2]', '2012-05'); |
| 47 shouldBeEqualToString('entryValues()[3]', '2012-07'); | 47 shouldBeEqualToString('entryValues()[3]', '2012-07'); |
| 48 shouldBeEqualToString('entryValues()[4]', '2012-09'); | 48 shouldBeEqualToString('entryValues()[4]', '2012-09'); |
| 49 shouldBeEqualToString('entryValues()[5]', '@openCalendarPicker'); | 49 shouldBeEqualToString('entryValues()[5]', '@openCalendarPicker'); |
| 50 | 50 |
| 51 eventSender.keyDown('\x1B'); // Close picker. | 51 eventSender.keyDown('escape'); // Close picker. |
| 52 waitUntilClosing(test1AfterClosing); | 52 waitUntilClosing(test1AfterClosing); |
| 53 } | 53 } |
| 54 | 54 |
| 55 function test1AfterClosing() { | 55 function test1AfterClosing() { |
| 56 dateElement.step = 5; | 56 dateElement.step = 5; |
| 57 openPicker(dateElement, test2); | 57 openPicker(dateElement, test2); |
| 58 } | 58 } |
| 59 | 59 |
| 60 function test2() { | 60 function test2() { |
| 61 popupWindow.focus(); | 61 popupWindow.focus(); |
| 62 | 62 |
| 63 shouldBe('entryValues().length', '3'); | 63 shouldBe('entryValues().length', '3'); |
| 64 shouldBeEqualToString('entryValues()[0]', '2012-01'); | 64 shouldBeEqualToString('entryValues()[0]', '2012-01'); |
| 65 shouldBeEqualToString('entryValues()[1]', '2012-06'); | 65 shouldBeEqualToString('entryValues()[1]', '2012-06'); |
| 66 shouldBeEqualToString('entryValues()[2]', '@openCalendarPicker'); | 66 shouldBeEqualToString('entryValues()[2]', '@openCalendarPicker'); |
| 67 | 67 |
| 68 eventSender.keyDown('\x1B'); // Close picker. | 68 eventSender.keyDown('escape'); // Close picker. |
| 69 waitUntilClosing(test2AfterClosing); | 69 waitUntilClosing(test2AfterClosing); |
| 70 } | 70 } |
| 71 | 71 |
| 72 function test2AfterClosing() { | 72 function test2AfterClosing() { |
| 73 dateElement.step = 30; | 73 dateElement.step = 30; |
| 74 openPicker(dateElement, test3); | 74 openPicker(dateElement, test3); |
| 75 } | 75 } |
| 76 | 76 |
| 77 function test3() { | 77 function test3() { |
| 78 popupWindow.focus(); | 78 popupWindow.focus(); |
| 79 | 79 |
| 80 shouldBe('entryValues().length', '2'); | 80 shouldBe('entryValues().length', '2'); |
| 81 shouldBeEqualToString('entryValues()[0]', '2012-01'); | 81 shouldBeEqualToString('entryValues()[0]', '2012-01'); |
| 82 shouldBeEqualToString('entryValues()[1]', '@openCalendarPicker'); | 82 shouldBeEqualToString('entryValues()[1]', '@openCalendarPicker'); |
| 83 | 83 |
| 84 finishJSTest(); | 84 finishJSTest(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 </script> | 87 </script> |
| 88 </body> | 88 </body> |
| 89 </html> | 89 </html> |
| OLD | NEW |