OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |