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

Side by Side Diff: ui/file_manager/file_manager/background/js/test_util.js

Issue 1994563002: Remove the use of KeyEvent.keyIdentifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Opens the main Files.app's window and waits until it is ready. 6 * Opens the main Files.app's window and waits until it is ready.
7 * 7 *
8 * @param {Object} appState App state. 8 * @param {Object} appState App state.
9 * @param {function(string)} callback Completion callback with the new window's 9 * @param {function(string)} callback Completion callback with the new window's
10 * App ID. 10 * App ID.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 * @param {Window} contentWindow Window to be tested. 180 * @param {Window} contentWindow Window to be tested.
181 * @param {string} filename Name of the file to be copied. 181 * @param {string} filename Name of the file to be copied.
182 * @return {boolean} True if copying got simulated successfully. It does not 182 * @return {boolean} True if copying got simulated successfully. It does not
183 * say if the file got copied, or not. 183 * say if the file got copied, or not.
184 */ 184 */
185 test.util.sync.copyFile = function(contentWindow, filename) { 185 test.util.sync.copyFile = function(contentWindow, filename) {
186 if (!test.util.sync.selectFile(contentWindow, filename)) 186 if (!test.util.sync.selectFile(contentWindow, filename))
187 return false; 187 return false;
188 // Ctrl+C and Ctrl+V 188 // Ctrl+C and Ctrl+V
189 test.util.sync.fakeKeyDown( 189 test.util.sync.fakeKeyDown(
190 contentWindow, '#file-list', 'w', 'U+0043', true, false, false); 190 contentWindow, '#file-list', 'c', 'U+0043', true, false, false);
oka 2016/06/09 13:32:31 Can you remove keyIdentifier from fakeKeyDown?
fukino 2016/06/09 13:47:50 As the cr.ui.Command still depends on keyIdentifie
191 test.util.sync.fakeKeyDown( 191 test.util.sync.fakeKeyDown(
192 contentWindow, '#file-list', 'v', 'U+0056', true, false, false); 192 contentWindow, '#file-list', 'v', 'U+0056', true, false, false);
193 return true; 193 return true;
194 }; 194 };
195 195
196 /** 196 /**
197 * Selects |filename| and fakes pressing the Delete key. 197 * Selects |filename| and fakes pressing the Delete key.
198 * 198 *
199 * @param {Window} contentWindow Window to be tested. 199 * @param {Window} contentWindow Window to be tested.
200 * @param {string} filename Name of the file to be deleted. 200 * @param {string} filename Name of the file to be deleted.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 * Obtains the preferences. 352 * Obtains the preferences.
353 * @param {function(Object)} callback Callback function with results returned by 353 * @param {function(Object)} callback Callback function with results returned by
354 * the script. 354 * the script.
355 */ 355 */
356 test.util.async.getPreferences = function(callback) { 356 test.util.async.getPreferences = function(callback) {
357 chrome.fileManagerPrivate.getPreferences(callback); 357 chrome.fileManagerPrivate.getPreferences(callback);
358 }; 358 };
359 359
360 // Register the test utils. 360 // Register the test utils.
361 test.util.registerRemoteTestUtils(); 361 test.util.registerRemoteTestUtils();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698