| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../resources/js-test.js"></script> |
| <script src="resources/calendar-picker-common.js"></script> |
| </head> |
| <body> |
| <p id="description"></p> |
| <div id="console"></div> |
| <input type=datetime-local id=test> |
| <script> |
| description("Tests if pressing F4 opens the calendar picker."); |
| |
| debug('Check that page popup doesn\'t exist at first.'); |
| shouldBeNull('internals.pagePopupWindow'); |
| |
| debug('Press F4 key.'); |
| sendKey(document.getElementById('test'), 'F4'); |
| shouldBeNonNull('internals.pagePopupWindow'); |
| |
| function sendKey(input, keyName) { |
| input.focus(); |
| eventSender.keyDown(keyName); |
| } |
| </script> |
| </body> |
| </html> |