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/macros.h" | 7 #include "base/macros.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 RegisterContentSchemes(&content_client); | 125 RegisterContentSchemes(&content_client); |
126 } | 126 } |
127 | 127 |
128 chrome::RegisterPathProvider(); | 128 chrome::RegisterPathProvider(); |
129 content::RegisterPathProvider(); | 129 content::RegisterPathProvider(); |
130 ui::RegisterPathProvider(); | 130 ui::RegisterPathProvider(); |
131 translate::BrowserCldDataProviderFactory::SetDefault( | 131 translate::BrowserCldDataProviderFactory::SetDefault( |
132 new translate::BrowserCldDataProviderFactory()); | 132 new translate::BrowserCldDataProviderFactory()); |
133 translate::CldDataSource::SetDefault( | 133 translate::CldDataSource::SetDefault( |
134 translate::CldDataSource::GetStaticDataSource()); | 134 translate::CldDataSource::GetStaticDataSource()); |
135 component_updater::RegisterPathProvider(chrome::DIR_USER_DATA); | 135 component_updater::RegisterPathProvider(chrome::DIR_COMPONENTS, |
| 136 chrome::DIR_USER_DATA); |
136 | 137 |
137 #if defined(OS_CHROMEOS) | 138 #if defined(OS_CHROMEOS) |
138 chromeos::RegisterPathProvider(); | 139 chromeos::RegisterPathProvider(); |
139 #endif | 140 #endif |
140 | 141 |
141 #if defined(ENABLE_EXTENSIONS) | 142 #if defined(ENABLE_EXTENSIONS) |
142 extensions::RegisterPathProvider(); | 143 extensions::RegisterPathProvider(); |
143 | 144 |
144 extensions::ExtensionsClient::Set( | 145 extensions::ExtensionsClient::Set( |
145 extensions::ChromeExtensionsClient::GetInstance()); | 146 extensions::ChromeExtensionsClient::GetInstance()); |
(...skipping 11 matching lines...) Expand all Loading... |
157 void ChromeUnitTestSuite::InitializeResourceBundle() { | 158 void ChromeUnitTestSuite::InitializeResourceBundle() { |
158 // Force unittests to run using en-US so if we test against string | 159 // Force unittests to run using en-US so if we test against string |
159 // output, it'll pass regardless of the system language. | 160 // output, it'll pass regardless of the system language. |
160 ui::ResourceBundle::InitSharedInstanceWithLocale( | 161 ui::ResourceBundle::InitSharedInstanceWithLocale( |
161 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); | 162 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
162 base::FilePath resources_pack_path; | 163 base::FilePath resources_pack_path; |
163 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 164 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
164 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 165 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
165 resources_pack_path, ui::SCALE_FACTOR_NONE); | 166 resources_pack_path, ui::SCALE_FACTOR_NONE); |
166 } | 167 } |
OLD | NEW |