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

Unified Diff: ui/file_manager/file_manager/background/js/test_util.js

Issue 2046143002: Send 'key' from fake keyboard events generated by file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix additional tests I missed 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/file_manager/background/js/test_util_base.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/test_util.js
diff --git a/ui/file_manager/file_manager/background/js/test_util.js b/ui/file_manager/file_manager/background/js/test_util.js
index 1a8073787dcfcb03b1485da59e3da79540688a24..12f882e370f4dea50700d2c72846a884de18b68c 100644
--- a/ui/file_manager/file_manager/background/js/test_util.js
+++ b/ui/file_manager/file_manager/background/js/test_util.js
@@ -68,13 +68,13 @@ test.util.sync.getFileList = function(contentWindow) {
test.util.sync.selectFile = function(contentWindow, filename) {
var rows = contentWindow.document.querySelectorAll('#detail-table li');
test.util.sync.fakeKeyDown(
- contentWindow, '#file-list', 'Home', false, false, false);
+ contentWindow, '#file-list', 'Home', 'Home', false, false, false);
for (var index = 0; index < rows.length; ++index) {
var selection = test.util.sync.getSelectedFiles(contentWindow);
if (selection.length === 1 && selection[0] === filename)
return true;
test.util.sync.fakeKeyDown(
- contentWindow, '#file-list', 'Down', false, false, false);
+ contentWindow, '#file-list', 'ArrowDown', 'Down', false, false, false);
}
console.error('Failed to select file "' + filename + '"');
return false;
@@ -187,9 +187,9 @@ test.util.sync.copyFile = function(contentWindow, filename) {
return false;
// Ctrl+C and Ctrl+V
test.util.sync.fakeKeyDown(
- contentWindow, '#file-list', 'U+0043', true, false, false);
+ contentWindow, '#file-list', 'w', 'U+0043', true, false, false);
test.util.sync.fakeKeyDown(
- contentWindow, '#file-list', 'U+0056', true, false, false);
+ contentWindow, '#file-list', 'v', 'U+0056', true, false, false);
return true;
};
@@ -206,7 +206,7 @@ test.util.sync.deleteFile = function(contentWindow, filename) {
return false;
// Delete
test.util.sync.fakeKeyDown(
- contentWindow, '#file-list', 'U+007F', false, false, false);
+ contentWindow, '#file-list', 'Delete', 'U+007F', false, false, false);
return true;
};
« no previous file with comments | « no previous file | ui/file_manager/file_manager/background/js/test_util_base.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698