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

Unified Diff: chrome/browser/extensions/api/preference/preference_apitest.cc

Issue 334083002: Add a test helper class for ExtensionRegistry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ben's comments 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/preference/preference_apitest.cc
diff --git a/chrome/browser/extensions/api/preference/preference_apitest.cc b/chrome/browser/extensions/api/preference/preference_apitest.cc
index 5112b9f4448fff2513a453d7596f49fbba206f02..6cdf5d830bd90d64c250303a7ddcb1c7581179cf 100644
--- a/chrome/browser/extensions/api/preference/preference_apitest.cc
+++ b/chrome/browser/extensions/api/preference/preference_apitest.cc
@@ -15,6 +15,8 @@
#include "chrome/test/base/ui_test_utils.h"
#include "components/translate/core/common/translate_pref_names.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/extension_test_registry_observer.h"
namespace {
@@ -117,11 +119,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, 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::ExtensionTestRegistryObserver observer(
+ extensions::ExtensionRegistry::Get(profile_));
UninstallExtension(last_loaded_extension_id());
- observer.Wait();
+ observer.WaitForAnyExtensionUninstalled();
CheckPreferencesCleared();
LoadExtension(test_data_dir_.AppendASCII(kExtensionPath));

Powered by Google App Engine
This is Rietveld 408576698