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

Side by Side Diff: LayoutTests/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-key-operations.html

Issue 484353004: Test tidying: use "escape" and "backspace" with eventSender.keyDown() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More quoting consistency wibbles Created 6 years, 4 months 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
OLDNEW
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 openPicker(document.getElementById('datetime-local')); 138 openPicker(document.getElementById('datetime-local'));
139 popupWindow.addEventListener('resize', test2, false); 139 popupWindow.addEventListener('resize', test2, false);
140 } 140 }
141 141
142 function test2() { 142 function test2() {
143 popupWindow.removeEventListener('resize', test2, false); 143 popupWindow.removeEventListener('resize', test2, false);
144 144
145 popupWindow.focus(); 145 popupWindow.focus();
146 146
147 debug('Check that escape key closes the popup.'); 147 debug('Check that escape key closes the popup.');
148 eventSender.keyDown('\x1B'); 148 eventSender.keyDown('escape');
149 waitUntilClosing(test2AfterClosing); 149 waitUntilClosing(test2AfterClosing);
150 } 150 }
151 151
152 function test2AfterClosing() { 152 function test2AfterClosing() {
153 shouldBeNull('document.getElementById("mock-page-popup")'); 153 shouldBeNull('document.getElementById("mock-page-popup")');
154 shouldBeEqualToString('document.getElementById("datetime-local").value', '20 12-11-22T02:07'); 154 shouldBeEqualToString('document.getElementById("datetime-local").value', '20 12-11-22T02:07');
155 155
156 sendKey(document.getElementById('datetime-local'), 'F4'); 156 sendKey(document.getElementById('datetime-local'), 'F4');
157 if (document.getElementById('mock-page-popup')) 157 if (document.getElementById('mock-page-popup'))
158 testPassed('F4 opened picker.'); 158 testPassed('F4 opened picker.');
159 159
160 finishJSTest(); 160 finishJSTest();
161 } 161 }
162 162
163 </script> 163 </script>
164 </body> 164 </body>
165 </html> 165 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698