Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: LayoutTests/fast/forms/calendar-picker/date-open-picker-with-f4-key.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="resources/calendar-picker-common.js"></script> 5 <script src="resources/calendar-picker-common.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p id="description"></p> 8 <p id="description"></p>
9 <div id="console"></div> 9 <div id="console"></div>
10 <input type=date id=test> 10 <input type=date id=test>
11 <script> 11 <script>
12 if (window.internals) 12 if (window.internals)
13 internals.setEnableMockPagePopup(true); 13 internals.setEnableMockPagePopup(true);
14 14
15 description("Tests if pressing F4 opens the calendar picker."); 15 description("Tests if pressing F4 opens the calendar picker.");
16 16
17 debug('Check that page popup doesn\'t exist at first.'); 17 debug('Check that page popup doesn\'t exist at first.');
18 shouldBeNull('document.getElementById("mock-page-popup")'); 18 shouldBeNull('document.getElementById("mock-page-popup")');
19 19
20 debug('Press F4 key.'); 20 debug('Press F4 key.');
21 sendKey(document.getElementById('test'), 'F4'); 21 sendKey(document.getElementById('test'), 'F4');
22 shouldBeNonNull('document.getElementById("mock-page-popup")'); 22 shouldBeNonNull('document.getElementById("mock-page-popup")');
23 23
24 function sendKey(input, keyName, ctrlKey, altKey) { 24 function sendKey(input, keyName, ctrlKey, altKey) {
25 var event = document.createEvent('KeyboardEvent'); 25 var event = document.createEvent('KeyboardEvent');
26 event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName , 0, ctrlKey, altKey); 26 event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName , 0, ctrlKey, altKey);
27 input.dispatchEvent(event); 27 input.dispatchEvent(event);
28 } 28 }
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698