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

Side by Side Diff: LayoutTests/fast/forms/suggestion-picker/week-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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698