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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 function test3() { | 170 function test3() { |
171 popupWindow.removeEventListener('didOpenPicker', test3); | 171 popupWindow.removeEventListener('didOpenPicker', test3); |
172 | 172 |
173 shouldBeFalse('expectingDidHideEvent'); | 173 shouldBeFalse('expectingDidHideEvent'); |
174 | 174 |
175 debug('Confirm calendar picker did open.'); | 175 debug('Confirm calendar picker did open.'); |
176 shouldBeTrue('popupWindow.document.getElementById("main").firstChild.classLi
st.contains("calendar-picker")'); | 176 shouldBeTrue('popupWindow.document.getElementById("main").firstChild.classLi
st.contains("calendar-picker")'); |
177 | 177 |
178 debug('Check that escape key closes the popup.'); | 178 debug('Check that escape key closes the popup.'); |
179 eventSender.keyDown('\x1B'); | 179 eventSender.keyDown("escape"); |
180 waitUntilClosing(test3AfterClosing); | 180 waitUntilClosing(test3AfterClosing); |
181 } | 181 } |
182 | 182 |
183 function test3AfterClosing() { | 183 function test3AfterClosing() { |
184 shouldBeNull('document.getElementById("mock-page-popup")'); | 184 shouldBeNull('document.getElementById("mock-page-popup")'); |
185 shouldBeEqualToString('document.getElementById("week").value', '2013-W18'); | 185 shouldBeEqualToString('document.getElementById("week").value', '2013-W18'); |
186 | 186 |
187 sendKey(document.getElementById('week'), 'F4'); | 187 sendKey(document.getElementById('week'), 'F4'); |
188 if (document.getElementById('mock-page-popup')) | 188 if (document.getElementById('mock-page-popup')) |
189 testPassed('F4 opened picker.'); | 189 testPassed('F4 opened picker.'); |
190 | 190 |
191 finishJSTest(); | 191 finishJSTest(); |
192 } | 192 } |
193 | 193 |
194 </script> | 194 </script> |
195 </body> | 195 </body> |
196 </html> | 196 </html> |
OLD | NEW |