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

Side by Side Diff: LayoutTests/fast/forms/suggestion-picker/date-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: 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 function test3() { 167 function test3() {
168 popupWindow.removeEventListener("didOpenPicker", test3); 168 popupWindow.removeEventListener("didOpenPicker", test3);
169 169
170 shouldBeFalse('expectingDidHideEvent'); 170 shouldBeFalse('expectingDidHideEvent');
171 171
172 debug('Confirm calendar picker did open.'); 172 debug('Confirm calendar picker did open.');
173 shouldBeTrue('popupWindow.document.getElementById("main").firstChild.classLi st.contains("calendar-picker")'); 173 shouldBeTrue('popupWindow.document.getElementById("main").firstChild.classLi st.contains("calendar-picker")');
174 174
175 debug('Check that escape key closes the popup.'); 175 debug('Check that escape key closes the popup.');
176 eventSender.keyDown('\x1B'); 176 eventSender.keyDown("escape");
keishi 2014/08/22 07:22:32 nit: string literals in this file are mostly using
177 waitUntilClosing(test3AfterClosing); 177 waitUntilClosing(test3AfterClosing);
178 } 178 }
179 179
180 function test3AfterClosing() { 180 function test3AfterClosing() {
181 shouldBeNull('document.getElementById("mock-page-popup")'); 181 shouldBeNull('document.getElementById("mock-page-popup")');
182 shouldBe('document.getElementById("date").value', '"2012-03-08"'); 182 shouldBe('document.getElementById("date").value', '"2012-03-08"');
183 183
184 sendKey(document.getElementById('date'), "F4"); 184 sendKey(document.getElementById('date'), "F4");
185 if (document.getElementById('mock-page-popup')) 185 if (document.getElementById('mock-page-popup'))
186 testPassed("F4 opened picker."); 186 testPassed("F4 opened picker.");
187 187
188 finishJSTest(); 188 finishJSTest();
189 } 189 }
190 190
191 </script> 191 </script>
192 </body> 192 </body>
193 </html> 193 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698