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

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

Issue 56253002: Move ExtensionsProcessManager to src/extensions, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, comments 1 Created 7 years, 1 month 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_process_manager_unittest.cc
diff --git a/chrome/browser/extensions/extension_process_manager_unittest.cc b/chrome/browser/extensions/extension_process_manager_unittest.cc
index 70a01f8516449cc1516c74796e63b567041e6b13..c8ca541e46ff86935adc896e488bdb144cae3733 100644
--- a/chrome/browser/extensions/extension_process_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_process_manager_unittest.cc
@@ -34,11 +34,6 @@ class ExtensionProcessManagerTest : public testing::Test {
return manager->registrar_.IsRegistered(
manager, type, content::Source<Profile>(profile));
}
-
- // Allows access to a protected method.
- static Profile* GetProfile(ExtensionProcessManager* manager) {
- return manager->GetProfile();
- }
};
// Test that notification registration works properly.
@@ -48,13 +43,9 @@ TEST_F(ExtensionProcessManagerTest, ExtensionNotificationRegistration) {
scoped_ptr<ExtensionProcessManager> manager1(
ExtensionProcessManager::Create(original_profile.get()));
- EXPECT_EQ(original_profile.get(), GetProfile(manager1.get()));
+ EXPECT_EQ(original_profile.get(), manager1->GetBrowserContext());
EXPECT_EQ(0u, manager1->background_hosts().size());
- // It observes some notifications from all sources.
- EXPECT_TRUE(IsRegistered(
- manager1.get(), chrome::NOTIFICATION_BROWSER_WINDOW_READY, NULL));
-
// It observes other notifications from this profile.
EXPECT_TRUE(IsRegistered(manager1.get(),
chrome::NOTIFICATION_EXTENSIONS_READY,
@@ -77,7 +68,7 @@ TEST_F(ExtensionProcessManagerTest, ExtensionNotificationRegistration) {
scoped_ptr<ExtensionProcessManager> manager2(
ExtensionProcessManager::Create(incognito_profile.get()));
- EXPECT_EQ(incognito_profile.get(), GetProfile(manager2.get()));
+ EXPECT_EQ(incognito_profile.get(), manager2->GetBrowserContext());
EXPECT_EQ(0u, manager2->background_hosts().size());
// Some notifications are observed for the original profile.

Powered by Google App Engine
This is Rietveld 408576698