Commit 34f7ecae authored by thestig's avatar thestig Committed by Commit bot

Make MockExtensionSystemFactory available in all ExtensionsTests.

BUG=454554

Review URL: https://codereview.chromium.org/899553002

Cr-Commit-Position: refs/heads/master@{#314373}
parent 280411c8
...@@ -32,8 +32,6 @@ namespace extensions { ...@@ -32,8 +32,6 @@ namespace extensions {
ApiUnitTest::ApiUnitTest() ApiUnitTest::ApiUnitTest()
: notification_service_(content::NotificationService::Create()) { : notification_service_(content::NotificationService::Create()) {
extensions_browser_client()->set_extension_system_factory(
&extension_system_factory_);
} }
ApiUnitTest::~ApiUnitTest() { ApiUnitTest::~ApiUnitTest() {
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/prefs/testing_pref_service.h" #include "base/prefs/testing_pref_service.h"
#include "extensions/browser/extensions_test.h" #include "extensions/browser/extensions_test.h"
#include "extensions/browser/mock_extension_system.h"
namespace base { namespace base {
class Value; class Value;
...@@ -92,8 +91,6 @@ class ApiUnitTest : public ExtensionsTest { ...@@ -92,8 +91,6 @@ class ApiUnitTest : public ExtensionsTest {
scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_;
TestingPrefServiceSimple testing_pref_service_; TestingPrefServiceSimple testing_pref_service_;
MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_;
// The WebContents used to associate a RenderViewHost with API function calls, // The WebContents used to associate a RenderViewHost with API function calls,
// or null. // or null.
scoped_ptr<content::WebContents> contents_; scoped_ptr<content::WebContents> contents_;
......
...@@ -32,6 +32,8 @@ ExtensionsTest::ExtensionsTest() ...@@ -32,6 +32,8 @@ ExtensionsTest::ExtensionsTest()
content::SetUtilityClientForTesting(content_utility_client_.get()); content::SetUtilityClientForTesting(content_utility_client_.get());
content::SetBrowserClientForTesting(content_browser_client_.get()); content::SetBrowserClientForTesting(content_browser_client_.get());
ExtensionsBrowserClient::Set(extensions_browser_client_.get()); ExtensionsBrowserClient::Set(extensions_browser_client_.get());
extensions_browser_client_->set_extension_system_factory(
&extension_system_factory_);
} }
ExtensionsTest::~ExtensionsTest() { ExtensionsTest::~ExtensionsTest() {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "content/public/test/test_renderer_host.h" #include "content/public/test/test_renderer_host.h"
#include "extensions/browser/mock_extension_system.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace content { namespace content {
...@@ -61,6 +62,8 @@ class ExtensionsTest : public testing::Test { ...@@ -61,6 +62,8 @@ class ExtensionsTest : public testing::Test {
// RenderViewHostTester. // RenderViewHostTester.
content::RenderViewHostTestEnabler rvh_test_enabler_; content::RenderViewHostTestEnabler rvh_test_enabler_;
MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_;
DISALLOW_COPY_AND_ASSIGN(ExtensionsTest); DISALLOW_COPY_AND_ASSIGN(ExtensionsTest);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment