OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/test/base/chrome_unit_test_suite.h" | 5 #include "chrome/test/base/chrome_unit_test_suite.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/process/process_handle.h" | 8 #include "base/process/process_handle.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/chrome_content_browser_client.h" | 10 #include "chrome/browser/chrome_content_browser_client.h" |
11 #include "chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h
" | 11 #include "chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h
" |
12 #include "chrome/common/chrome_content_client.h" | 12 #include "chrome/common/chrome_content_client.h" |
13 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
14 #include "chrome/test/base/testing_browser_process.h" | 14 #include "chrome/test/base/testing_browser_process.h" |
15 #include "chrome/utility/chrome_content_utility_client.h" | 15 #include "chrome/utility/chrome_content_utility_client.h" |
16 #include "components/component_updater/component_updater_paths.h" | 16 #include "components/component_updater/component_updater_paths.h" |
17 #include "components/omaha_query_params/omaha_query_params.h" | 17 #include "components/omaha_query_params/omaha_query_params.h" |
| 18 #include "components/translate/content/browser/browser_cld_data_provider_factory
.h" |
| 19 #include "components/translate/content/common/cld_data_source.h" |
18 #include "content/public/common/content_paths.h" | 20 #include "content/public/common/content_paths.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/base/resource/resource_handle.h" | 23 #include "ui/base/resource/resource_handle.h" |
22 #include "ui/base/ui_base_paths.h" | 24 #include "ui/base/ui_base_paths.h" |
23 | 25 |
24 #if defined(OS_CHROMEOS) | 26 #if defined(OS_CHROMEOS) |
25 #include "chromeos/chromeos_paths.h" | 27 #include "chromeos/chromeos_paths.h" |
26 #endif | 28 #endif |
27 | 29 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 119 |
118 void ChromeUnitTestSuite::InitializeProviders() { | 120 void ChromeUnitTestSuite::InitializeProviders() { |
119 { | 121 { |
120 ChromeContentClient content_client; | 122 ChromeContentClient content_client; |
121 RegisterContentSchemes(&content_client); | 123 RegisterContentSchemes(&content_client); |
122 } | 124 } |
123 | 125 |
124 chrome::RegisterPathProvider(); | 126 chrome::RegisterPathProvider(); |
125 content::RegisterPathProvider(); | 127 content::RegisterPathProvider(); |
126 ui::RegisterPathProvider(); | 128 ui::RegisterPathProvider(); |
| 129 translate::BrowserCldDataProviderFactory::SetDefault( |
| 130 new translate::BrowserCldDataProviderFactory()); |
| 131 translate::CldDataSource::SetDefault( |
| 132 translate::CldDataSource::GetStaticDataSource()); |
127 component_updater::RegisterPathProvider(chrome::DIR_USER_DATA); | 133 component_updater::RegisterPathProvider(chrome::DIR_USER_DATA); |
128 | 134 |
129 #if defined(OS_CHROMEOS) | 135 #if defined(OS_CHROMEOS) |
130 chromeos::RegisterPathProvider(); | 136 chromeos::RegisterPathProvider(); |
131 #endif | 137 #endif |
132 | 138 |
133 #if defined(ENABLE_EXTENSIONS) | 139 #if defined(ENABLE_EXTENSIONS) |
134 extensions::RegisterPathProvider(); | 140 extensions::RegisterPathProvider(); |
135 | 141 |
136 extensions::ExtensionsClient::Set( | 142 extensions::ExtensionsClient::Set( |
(...skipping 20 matching lines...) Expand all Loading... |
157 #if defined(OS_MACOSX) && !defined(OS_IOS) | 163 #if defined(OS_MACOSX) && !defined(OS_IOS) |
158 PathService::Get(base::DIR_MODULE, &resources_pack_path); | 164 PathService::Get(base::DIR_MODULE, &resources_pack_path); |
159 resources_pack_path = | 165 resources_pack_path = |
160 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); | 166 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); |
161 #else | 167 #else |
162 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 168 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
163 #endif | 169 #endif |
164 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 170 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
165 resources_pack_path, ui::SCALE_FACTOR_NONE); | 171 resources_pack_path, ui::SCALE_FACTOR_NONE); |
166 } | 172 } |
OLD | NEW |