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

Unified Diff: chrome/browser/extensions/api/content_settings/content_settings_apitest.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/api/content_settings/content_settings_apitest.cc
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
index f50535ac9b6554482932da59f6513218ae774505..1fa2f0a350c30dfcbbcd8bb80890749cb56f2a12 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
+++ b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
@@ -18,6 +18,8 @@
#include "content/public/browser/plugin_service.h"
#include "content/public/common/webplugininfo.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/test_extension_registry_observer.h"
namespace {
@@ -196,11 +198,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionContentSettingsApiTest, MAYBE_Standard) {
// Uninstalling and installing the extension (without running the test that
// calls the extension API) should clear the settings.
- content::WindowedNotificationObserver observer(
- chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
- content::NotificationService::AllSources());
+ extensions::TestExtensionRegistryObserver observer(
+ extensions::ExtensionRegistry::Get(profile()));
+ LOG(INFO) << "uninstallid:" + last_loaded_extension_id();
Yoyo Zhou 2014/06/17 18:15:37 Please remove these log lines.
limasdf 2014/06/19 18:06:27 Done.
UninstallExtension(last_loaded_extension_id());
- observer.Wait();
+ observer.WaitForExtensionUninstalled(last_loaded_extension_id());
CheckContentSettingsDefault();
LoadExtension(test_data_dir_.AppendASCII(kExtensionPath));

Powered by Google App Engine
This is Rietveld 408576698