| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 openPicker(document.getElementById('time')); | 139 openPicker(document.getElementById('time')); |
| 140 popupWindow.addEventListener("resize", test2, false); | 140 popupWindow.addEventListener("resize", test2, false); |
| 141 } | 141 } |
| 142 | 142 |
| 143 function test2() { | 143 function test2() { |
| 144 popupWindow.removeEventListener("resize", test2, false); | 144 popupWindow.removeEventListener("resize", test2, false); |
| 145 | 145 |
| 146 popupWindow.focus(); | 146 popupWindow.focus(); |
| 147 | 147 |
| 148 debug('Check that escape key closes the popup.'); | 148 debug('Check that escape key closes the popup.'); |
| 149 eventSender.keyDown('\x1B'); | 149 eventSender.keyDown("escape"); |
| 150 waitUntilClosing(test2AfterClosing); | 150 waitUntilClosing(test2AfterClosing); |
| 151 } | 151 } |
| 152 | 152 |
| 153 function test2AfterClosing() { | 153 function test2AfterClosing() { |
| 154 shouldBeNull('document.getElementById("mock-page-popup")'); | 154 shouldBeNull('document.getElementById("mock-page-popup")'); |
| 155 shouldBe('document.getElementById("time").value', '"02:07"'); | 155 shouldBe('document.getElementById("time").value', '"02:07"'); |
| 156 | 156 |
| 157 sendKey(document.getElementById('time'), "F4"); | 157 sendKey(document.getElementById('time'), "F4"); |
| 158 if (document.getElementById('mock-page-popup')) | 158 if (document.getElementById('mock-page-popup')) |
| 159 testPassed("F4 opened picker."); | 159 testPassed("F4 opened picker."); |
| 160 | 160 |
| 161 finishJSTest(); | 161 finishJSTest(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 </script> | 164 </script> |
| 165 </body> | 165 </body> |
| 166 </html> | 166 </html> |
| OLD | NEW |