Chromium Code Reviews| Index: chrome/browser/apps/app_browsertest.cc |
| diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc |
| index 1c837c2d83972a9b0ceaa983665fba993d368225..ac777e66746cccd3d84025a02032d29837627d7f 100644 |
| --- a/chrome/browser/apps/app_browsertest.cc |
| +++ b/chrome/browser/apps/app_browsertest.cc |
| @@ -1054,7 +1054,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ComponentAppBackgroundPage) { |
| // Flaky: http://crbug.com/407409 |
|
tapted
2014/09/23 00:16:33
This can be removed, or replaced with a brief desc
Anand Mistry (off Chromium)
2014/09/23 00:25:43
Removed. No longer relevant.
|
| IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
| - DISABLED_ComponentExtensionRuntimeReload) { |
| + ComponentExtensionRuntimeReload) { |
| // Ensure that we wait until the background page is run (to register the |
| // OnLaunched listener) before trying to open the application. This is similar |
| // to LoadAndLaunchPlatformApp, but we want to load as a component extension. |
| @@ -1077,7 +1077,13 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
| { |
| ASSERT_TRUE(ExecuteScriptInBackgroundPageNoWait( |
| - extension->id(), "chrome.runtime.reload();")); |
| + extension->id(), |
| + // NoWait actually waits for a domAutomationController.send() which is |
| + // implicitly append to the script. Since reload() restarts the |
| + // extension, the send after reload may not get executed. To get around |
| + // this, send first, then execute the reload(). |
| + "window.domAutomationController.send(0);" |
| + "chrome.runtime.reload();")); |
| ExtensionTestMessageListener launched_listener("Launched", false); |
|
tapted
2014/09/23 00:16:33
should this come before the ExecuteScript? Otherwi
Anand Mistry (off Chromium)
2014/09/23 00:25:43
Done.
tapted
2014/09/23 00:48:00
(actually I realised after I sent this that a slee
|
| ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
| } |