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

Unified Diff: chrome/browser/resources/file_manager/background/js/test_util.js

Issue 230073002: Files.app: Reland r261616: Add a test to rename a file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a test. Created 6 years, 8 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
Index: chrome/browser/resources/file_manager/background/js/test_util.js
diff --git a/chrome/browser/resources/file_manager/background/js/test_util.js b/chrome/browser/resources/file_manager/background/js/test_util.js
index d173e3f5bb38a72aa5850c66e608576b381a2719..0b13b04d532cf0f031118164b1e5a5da4b5abed3 100644
--- a/chrome/browser/resources/file_manager/background/js/test_util.js
+++ b/chrome/browser/resources/file_manager/background/js/test_util.js
@@ -229,13 +229,13 @@ test.util.sync.inputText = function(contentWindow, query, text) {
* @return {boolean} True if file got selected, false otherwise.
*/
test.util.sync.selectFile = function(contentWindow, filename) {
- var table = contentWindow.document.querySelector('#detail-table');
- var rows = table.querySelectorAll('li');
+ var rows = contentWindow.document.querySelectorAll('#detail-table li');
+ test.util.sync.fakeKeyDown(contentWindow, '#file-list', 'Home', false);
for (var index = 0; index < rows.length; ++index) {
- test.util.sync.fakeKeyDown(contentWindow, '#file-list', 'Down', false);
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);
}
console.error('Failed to select file "' + filename + '"');
return false;

Powered by Google App Engine
This is Rietveld 408576698