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

Unified Diff: chrome/browser/apps/app_browsertest.cc

Issue 2893693002: Remove NOTIFICATION_EXTENSION_ENABLED. (Closed)
Patch Set: add code for component reload Created 3 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/browser/apps/app_browsertest.cc
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index 0f924731a094736e00f4c3cff2e8a66d2da11fe8..f77e3450b704333056241d8f38ffe21118aeda12 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -944,6 +944,23 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ReloadRelaunches) {
ASSERT_TRUE(GetFirstAppWindow());
}
+// Tests that reloading a component app loads its (lazy) background page.
+IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
+ ComponentReloadLoadsLazyBackgroundPage) {
+ ExtensionTestMessageListener launched_listener("Launched", true);
+ const Extension* component_app = LoadExtensionAsComponentWithManifest(
+ test_data_dir_.AppendASCII("platform_apps")
+ .AppendASCII("component_reload"),
+ FILE_PATH_LITERAL("manifest.json"));
+ ASSERT_TRUE(component_app);
+ ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
+
+ // Now tell the app to reload itself
Devlin 2017/06/02 01:57:28 nittiest of nits: end in a '.'
lazyboy 2017/06/02 18:35:37 Done.
+ ExtensionTestMessageListener launched_listener2("Launched", false);
+ launched_listener.Reply("reload");
+ ASSERT_TRUE(launched_listener2.WaitUntilSatisfied());
+}
+
namespace {
// Utility class to ensure extension installation does or does not occur in
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.h » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698