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

Unified Diff: chrome/browser/extensions/extension_storage_monitor_browsertest.cc

Issue 334083002: Add a test helper class for ExtensionRegistry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Y and B comments. 2014 brazil world cup morning at 6AM korea vs russia Created 6 years, 6 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/extensions/extension_storage_monitor_browsertest.cc
diff --git a/chrome/browser/extensions/extension_storage_monitor_browsertest.cc b/chrome/browser/extensions/extension_storage_monitor_browsertest.cc
index 1c32600bdcaf19a3d5397821ca240bddb11604e1..a3e0e17f92aed247f469f5b1d2be80817c7a9a3e 100644
--- a/chrome/browser/extensions/extension_storage_monitor_browsertest.cc
+++ b/chrome/browser/extensions/extension_storage_monitor_browsertest.cc
@@ -13,7 +13,9 @@
#include "chrome/browser/ui/extensions/application_launch.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/extension_prefs.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/browser/test_extension_registry_observer.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_observer.h"
@@ -332,11 +334,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionStorageMonitorTest, UninstallExtension) {
ExtensionStorageMonitor::BUTTON_UNINSTALL);
// Also fake accepting the uninstall.
- content::WindowedNotificationObserver uninstalled_signal(
- chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
- content::Source<Profile>(profile()));
+ extensions::TestExtensionRegistryObserver observer(
+ extensions::ExtensionRegistry::Get(profile()));
SimulateUninstallDialogAccept();
- uninstalled_signal.Wait();
+ observer.WaitForExtensionUninstalled(extension->id());
Yoyo Zhou 2014/06/17 18:15:37 You should copy extension->id() into a temporary s
limasdf 2014/06/19 18:06:28 Pass to the contructor.
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698