| 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);
|
| });
|
| });
|
| }
|
|
|