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 {
ApiUnitTest::ApiUnitTest()
: notification_service_(content::NotificationService::Create()) {
extensions_browser_client()->set_extension_system_factory(
&extension_system_factory_);
}
ApiUnitTest::~ApiUnitTest() {
......
......@@ -11,7 +11,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/prefs/testing_pref_service.h"
#include "extensions/browser/extensions_test.h"
#include "extensions/browser/mock_extension_system.h"
namespace base {
class Value;
......@@ -92,8 +91,6 @@ class ApiUnitTest : public ExtensionsTest {
scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_;
TestingPrefServiceSimple testing_pref_service_;
MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_;
// The WebContents used to associate a RenderViewHost with API function calls,
// or null.
scoped_ptr<content::WebContents> contents_;
......
......@@ -32,6 +32,8 @@ ExtensionsTest::ExtensionsTest()
content::SetUtilityClientForTesting(content_utility_client_.get());
content::SetBrowserClientForTesting(content_browser_client_.get());
ExtensionsBrowserClient::Set(extensions_browser_client_.get());
extensions_browser_client_->set_extension_system_factory(
&extension_system_factory_);
}
ExtensionsTest::~ExtensionsTest() {
......
......@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/test/test_renderer_host.h"
#include "extensions/browser/mock_extension_system.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
......@@ -61,6 +62,8 @@ class ExtensionsTest : public testing::Test {
// RenderViewHostTester.
content::RenderViewHostTestEnabler rvh_test_enabler_;
MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_;
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