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

Side by Side Diff: extensions/browser/api_unittest.cc

Issue 899553002: Make MockExtensionSystemFactory available in all ExtensionsTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « extensions/browser/api_unittest.h ('k') | extensions/browser/extensions_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api_unittest.h" 5 #include "extensions/browser/api_unittest.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "components/user_prefs/user_prefs.h" 8 #include "components/user_prefs/user_prefs.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 14 matching lines...) Expand all
25 #include "extensions/common/manifest.h" 25 #include "extensions/common/manifest.h"
26 #include "extensions/common/manifest_handlers/background_info.h" 26 #include "extensions/common/manifest_handlers/background_info.h"
27 #include "extensions/common/value_builder.h" 27 #include "extensions/common/value_builder.h"
28 28
29 namespace utils = extensions::api_test_utils; 29 namespace utils = extensions::api_test_utils;
30 30
31 namespace extensions { 31 namespace extensions {
32 32
33 ApiUnitTest::ApiUnitTest() 33 ApiUnitTest::ApiUnitTest()
34 : notification_service_(content::NotificationService::Create()) { 34 : notification_service_(content::NotificationService::Create()) {
35 extensions_browser_client()->set_extension_system_factory(
36 &extension_system_factory_);
37 } 35 }
38 36
39 ApiUnitTest::~ApiUnitTest() { 37 ApiUnitTest::~ApiUnitTest() {
40 } 38 }
41 39
42 void ApiUnitTest::SetUp() { 40 void ApiUnitTest::SetUp() {
43 ExtensionsTest::SetUp(); 41 ExtensionsTest::SetUp();
44 42
45 thread_bundle_.reset(new content::TestBrowserThreadBundle( 43 thread_bundle_.reset(new content::TestBrowserThreadBundle(
46 content::TestBrowserThreadBundle::DEFAULT)); 44 content::TestBrowserThreadBundle::DEFAULT));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 function->SetRenderViewHost(contents_->GetRenderViewHost()); 111 function->SetRenderViewHost(contents_->GetRenderViewHost());
114 return utils::RunFunctionAndReturnError(function, args, browser_context()); 112 return utils::RunFunctionAndReturnError(function, args, browser_context());
115 } 113 }
116 114
117 void ApiUnitTest::RunFunction(UIThreadExtensionFunction* function, 115 void ApiUnitTest::RunFunction(UIThreadExtensionFunction* function,
118 const std::string& args) { 116 const std::string& args) {
119 RunFunctionAndReturnValue(function, args); 117 RunFunctionAndReturnValue(function, args);
120 } 118 }
121 119
122 } // namespace extensions 120 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api_unittest.h ('k') | extensions/browser/extensions_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698