| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 function test3() { | 160 function test3() { |
| 161 popupWindow.removeEventListener("didOpenPicker", test3); | 161 popupWindow.removeEventListener("didOpenPicker", test3); |
| 162 | 162 |
| 163 shouldBeFalse('expectingDidHideEvent'); | 163 shouldBeFalse('expectingDidHideEvent'); |
| 164 | 164 |
| 165 debug('Confirm calendar picker did open.'); | 165 debug('Confirm calendar picker did open.'); |
| 166 shouldBeTrue('popupWindow.document.getElementById("main").firstChild.classLi
st.contains("calendar-picker")'); | 166 shouldBeTrue('popupWindow.document.getElementById("main").firstChild.classLi
st.contains("calendar-picker")'); |
| 167 | 167 |
| 168 debug('Check that escape key closes the popup.'); | 168 debug('Check that escape key closes the popup.'); |
| 169 eventSender.keyDown('\x1B'); | 169 eventSender.keyDown('escape'); |
| 170 waitUntilClosing(test3AfterClosing); | 170 waitUntilClosing(test3AfterClosing); |
| 171 } | 171 } |
| 172 | 172 |
| 173 function test3AfterClosing() { | 173 function test3AfterClosing() { |
| 174 shouldBeNull('document.getElementById("mock-page-popup")'); | 174 shouldBeNull('document.getElementById("mock-page-popup")'); |
| 175 shouldBeEqualToString('document.getElementById("month").value', '2016-12'); | 175 shouldBeEqualToString('document.getElementById("month").value', '2016-12'); |
| 176 | 176 |
| 177 sendKey(document.getElementById('month'), "F4"); | 177 sendKey(document.getElementById('month'), "F4"); |
| 178 if (document.getElementById('mock-page-popup')) | 178 if (document.getElementById('mock-page-popup')) |
| 179 testPassed("F4 opened picker."); | 179 testPassed("F4 opened picker."); |
| 180 | 180 |
| 181 finishJSTest(); | 181 finishJSTest(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 </script> | 184 </script> |
| 185 </body> | 185 </body> |
| 186 </html> | 186 </html> |
| OLD | NEW |