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

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

Issue 1052703002: Cleanup/ Remove deprecated extension notification from c/b/apps/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | chrome/browser/apps/ephemeral_app_launcher_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/ephemeral_app_browsertest.cc
diff --git a/chrome/browser/apps/ephemeral_app_browsertest.cc b/chrome/browser/apps/ephemeral_app_browsertest.cc
index 348a125b8ec5b91945d7bd9a066cf84209897d06..28046323f86820cade234d69e7987a91aaf44c54 100644
--- a/chrome/browser/apps/ephemeral_app_browsertest.cc
+++ b/chrome/browser/apps/ephemeral_app_browsertest.cc
@@ -31,8 +31,8 @@
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extension_util.h"
-#include "extensions/browser/notification_types.h"
#include "extensions/browser/process_manager.h"
+#include "extensions/browser/test_extension_registry_observer.h"
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/api/alarms.h"
#include "extensions/common/extension.h"
@@ -316,19 +316,17 @@ void EphemeralAppTestBase::CloseApp(const std::string& app_id) {
void EphemeralAppTestBase::CloseAppWaitForUnload(const std::string& app_id) {
// Ephemeral apps are unloaded from extension system after they stop running.
- content::WindowedNotificationObserver unloaded_signal(
- extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
- content::Source<Profile>(profile()));
+ extensions::TestExtensionRegistryObserver observer(
+ ExtensionRegistry::Get(profile()), app_id);
CloseApp(app_id);
- unloaded_signal.Wait();
+ observer.WaitForExtensionUnloaded();
}
void EphemeralAppTestBase::EvictApp(const std::string& app_id) {
// Uninstall the app, which is what happens when ephemeral apps get evicted
// from the cache.
- content::WindowedNotificationObserver uninstalled_signal(
- extensions::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
- content::Source<Profile>(profile()));
+ extensions::TestExtensionRegistryObserver observer(
+ ExtensionRegistry::Get(profile()), app_id);
ExtensionService* service =
ExtensionSystem::Get(profile())->extension_service();
@@ -339,7 +337,7 @@ void EphemeralAppTestBase::EvictApp(const std::string& app_id) {
base::Bind(&base::DoNothing),
NULL);
- uninstalled_signal.Wait();
+ observer.WaitForExtensionUninstalled();
}
// EphemeralAppBrowserTest:
@@ -965,12 +963,11 @@ IN_PROC_BROWSER_TEST_F(EphemeralAppBrowserTest,
ReplaceEphemeralApp(app_id, kNotificationsTestApp, 0);
// The delayed installation will occur when the ephemeral app is closed.
- content::WindowedNotificationObserver installed_signal(
- extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED,
- content::Source<Profile>(profile()));
+ extensions::TestExtensionRegistryObserver observer(
+ ExtensionRegistry::Get(profile()), app_id);
InstallObserver installed_observer(profile());
CloseAppWaitForUnload(app_id);
- installed_signal.Wait();
+ observer.WaitForExtensionWillBeInstalled();
VerifyPromotedApp(app_id, ExtensionRegistry::ENABLED);
// Check the notification parameters.
« no previous file with comments | « no previous file | chrome/browser/apps/ephemeral_app_launcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698