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

Unified Diff: chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.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/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
index d37b977d1f1e8051e8c8d53104bf6c8bc48a1b80..b42b1b7d7aace34c405be9dec40afbe71504a927 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
@@ -20,6 +20,8 @@
#include "content/public/test/test_utils.h"
#include "content/test/net/url_request_mock_http_job.h"
#include "crypto/nss_util.h"
+#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/test_extension_registry_observer.h"
#include "net/base/net_errors.h"
#include "net/cert/nss_cert_database.h"
#include "policy/policy_constants.h"
@@ -201,11 +203,10 @@ class EnterprisePlatformKeysTest : public ExtensionApiTest {
NULL);
// Set the policy and wait until the extension is installed.
- content::WindowedNotificationObserver observer(
- chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
- content::NotificationService::AllSources());
+ extensions::ExtensionTestRegistryObserver observer(
+ extensions::ExtensionRegistry::Get(browser()->profile()));
policy_provider_.UpdateChromePolicy(policy);
- observer.Wait();
+ observer.WaitForAnyExtensionWillBeInstalled();
}
scoped_ptr<crypto::ScopedTestNSSDB> test_nssdb_;

Powered by Google App Engine
This is Rietveld 408576698