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

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

Issue 15817002: Remove races in window creation in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 7 years, 7 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 | « chrome/browser/resources/file_manager/js/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/test_util.js
diff --git a/chrome/browser/resources/file_manager/js/test_util.js b/chrome/browser/resources/file_manager/js/test_util.js
index f083bb9dd0a09d0f6438bbfed309b7c886b8900d..1d686ab2e31f94eb37b58f0c16e7eaf661260c3f 100644
--- a/chrome/browser/resources/file_manager/js/test_util.js
+++ b/chrome/browser/resources/file_manager/js/test_util.js
@@ -27,7 +27,7 @@ test.util.TESTING_EXTENSION_ID = 'oobinhbdbiehknkpbpejbbpdbkdjmoco';
* App ID.
*/
test.util.openMainWindow = function(path, callback) {
- var appId = launchFileManager({defaultPath: path});
+ var appId;
function helper() {
if (appWindows[appId]) {
var contentWindow = appWindows[appId].contentWindow;
@@ -39,7 +39,13 @@ test.util.openMainWindow = function(path, callback) {
}
window.setTimeout(helper, 50);
}
- helper();
+ launchFileManager({defaultPath: path},
+ undefined, // opt_type
+ undefined, // opt_id
+ function(id) {
+ appId = id;
+ helper();
+ });
};
/**
« no previous file with comments | « chrome/browser/resources/file_manager/js/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698