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

Unified Diff: chrome/test/data/extensions/platform_apps/active_test/test.js

Issue 306823002: Flip --enable-apps-show-on-first-paint flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests Created 6 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
Index: chrome/test/data/extensions/platform_apps/active_test/test.js
diff --git a/chrome/test/data/extensions/platform_apps/active_test/test.js b/chrome/test/data/extensions/platform_apps/active_test/test.js
index 984c49748ec695674bacb9db61f2fde0d47daea7..92cd56e6bf6688efc31afbdbc6d225306679632c 100644
--- a/chrome/test/data/extensions/platform_apps/active_test/test.js
+++ b/chrome/test/data/extensions/platform_apps/active_test/test.js
@@ -33,9 +33,16 @@ function processNextCommand() {
chrome.app.window.create('empty.html', createOptions,
function(createdWindow) {
- createdWindow.onClosed.addListener(windowClosed);
- windows.push(createdWindow);
- processNextCommand();
+ handleWindowReady = function() {
+ createdWindow.onClosed.addListener(windowClosed);
+ windows.push(createdWindow);
+ processNextCommand();
+ }
+
+ if (createOptions.hidden)
+ handleWindowReady();
+ else
+ createdWindow.onWindowFirstShown.addListener(handleWindowReady);
});
});
}

Powered by Google App Engine
This is Rietveld 408576698