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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/resources/common.js

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 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 function $(id) { 1 function $(id) {
2 return document.getElementById(id); 2 return document.getElementById(id);
3 } 3 }
4 4
5 function createFormControlDataSet() { 5 function createFormControlDataSet() {
6 // A list of labelable elements resides in http://www.whatwg.org/specs/web-a pps/current-work/multipage/forms.html#category-label 6 // A list of labelable elements resides in http://www.whatwg.org/specs/web-a pps/current-work/multipage/forms.html#category-label
7 var formControlClassNames = [ 7 var formControlClassNames = [
8 'HTMLButtonElement', 8 'HTMLButtonElement',
9 'HTMLDataListElement', 9 'HTMLDataListElement',
10 'HTMLFieldSetElement', 10 'HTMLFieldSetElement',
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (loaded) 214 if (loaded)
215 callback(); 215 callback();
216 }, false); 216 }, false);
217 } 217 }
218 218
219 function sendString(str) { 219 function sendString(str) {
220 if (!window.eventSender) { 220 if (!window.eventSender) {
221 console.log('Require eventSender.'); 221 console.log('Require eventSender.');
222 return; 222 return;
223 } 223 }
224 for (var i = 0; i < str.length; ++i) 224 for (var i = 0; i < str.length; ++i) {
225 eventSender.keyDown(str.charAt(i)); 225 var key = str.charAt(i);
226 if (key == '\n')
227 key = 'Enter';
228 eventSender.keyDown(key);
229 }
226 } 230 }
227 231
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698