diff options
author | limasdf@gmail.com <limasdf@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-20 07:46:50 +0000 |
---|---|---|
committer | limasdf@gmail.com <limasdf@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-20 07:46:50 +0000 |
commit | ff3b4451ec6fc577f34ee4c8e3d0bf281efb1ad2 (patch) | |
tree | 515c23463244b7924d85ea7fc1ecefd52d5fbc1b /extensions/browser/process_manager_unittest.cc | |
parent | 89147b5073ae841a6e08468331c9eee46f89c48b (diff) | |
download | chromium_src-ff3b4451ec6fc577f34ee4c8e3d0bf281efb1ad2.zip chromium_src-ff3b4451ec6fc577f34ee4c8e3d0bf281efb1ad2.tar.gz chromium_src-ff3b4451ec6fc577f34ee4c8e3d0bf281efb1ad2.tar.bz2 |
Remove deprecated extension notifications from ProcessManager and use ExtensionRegistry instead.
BUG=354046
Review URL: https://codereview.chromium.org/397743005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/process_manager_unittest.cc')
-rw-r--r-- | extensions/browser/process_manager_unittest.cc | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/extensions/browser/process_manager_unittest.cc b/extensions/browser/process_manager_unittest.cc index b72b112..921cf30 100644 --- a/extensions/browser/process_manager_unittest.cc +++ b/extensions/browser/process_manager_unittest.cc @@ -8,20 +8,19 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/site_instance.h" -#include "content/public/test/test_browser_context.h" +#include "extensions/browser/extensions_test_browser_context.h" #include "extensions/browser/test_extensions_browser_client.h" #include "testing/gtest/include/gtest/gtest.h" using content::BrowserContext; using content::SiteInstance; -using content::TestBrowserContext; namespace extensions { namespace { -// An incognito version of a TestBrowserContext. -class TestBrowserContextIncognito : public TestBrowserContext { +// An incognito version of a ExtensionsTestBrowserContext. +class TestBrowserContextIncognito : public ExtensionsTestBrowserContext { public: TestBrowserContextIncognito() {} virtual ~TestBrowserContextIncognito() {} @@ -59,7 +58,7 @@ class ProcessManagerTest : public testing::Test { } private: - TestBrowserContext original_context_; + ExtensionsTestBrowserContext original_context_; TestBrowserContextIncognito incognito_context_; TestExtensionsBrowserClient extensions_browser_client_; @@ -80,12 +79,6 @@ TEST_F(ProcessManagerTest, ExtensionNotificationRegistration) { chrome::NOTIFICATION_EXTENSIONS_READY, original_context())); EXPECT_TRUE(IsRegistered(manager1.get(), - chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, - original_context())); - EXPECT_TRUE(IsRegistered(manager1.get(), - chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, - original_context())); - EXPECT_TRUE(IsRegistered(manager1.get(), chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED, original_context())); @@ -96,11 +89,6 @@ TEST_F(ProcessManagerTest, ExtensionNotificationRegistration) { EXPECT_EQ(incognito_context(), manager2->GetBrowserContext()); EXPECT_EQ(0u, manager2->background_hosts().size()); - // Some notifications are observed for the original context. - EXPECT_TRUE(IsRegistered(manager2.get(), - chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, - original_context())); - // Some notifications are observed for the incognito context. EXPECT_TRUE(IsRegistered(manager2.get(), chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED, @@ -135,9 +123,8 @@ TEST_F(ProcessManagerTest, ProcessGrouping) { // SiteInstances. scoped_ptr<ProcessManager> manager1( ProcessManager::Create(original_context())); - // NOTE: This context is not associated with the TestExtensionsBrowserClient. - // That's OK because we're not testing regular vs. incognito behavior. - TestBrowserContext another_context; + + ExtensionsTestBrowserContext another_context; scoped_ptr<ProcessManager> manager2(ProcessManager::Create(&another_context)); // Extensions with common origins ("scheme://id/") should be grouped in the |