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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 #if defined(ENABLE_EXTENSIONS) | 142 #if defined(ENABLE_EXTENSIONS) |
143 extensions::RegisterPathProvider(); | 143 extensions::RegisterPathProvider(); |
144 | 144 |
145 extensions::ExtensionsClient::Set( | 145 extensions::ExtensionsClient::Set( |
146 extensions::ChromeExtensionsClient::GetInstance()); | 146 extensions::ChromeExtensionsClient::GetInstance()); |
147 #endif | 147 #endif |
148 | 148 |
149 content::WebUIControllerFactory::RegisterFactory( | 149 content::WebUIControllerFactory::RegisterFactory( |
150 ChromeWebUIControllerFactory::GetInstance()); | 150 ChromeWebUIControllerFactory::GetInstance()); |
151 | 151 |
152 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 152 gl::GLSurfaceTestSupport::InitializeOneOff(); |
153 | 153 |
154 update_client::UpdateQueryParams::SetDelegate( | 154 update_client::UpdateQueryParams::SetDelegate( |
155 ChromeUpdateQueryParamsDelegate::GetInstance()); | 155 ChromeUpdateQueryParamsDelegate::GetInstance()); |
156 } | 156 } |
157 | 157 |
158 void ChromeUnitTestSuite::InitializeResourceBundle() { | 158 void ChromeUnitTestSuite::InitializeResourceBundle() { |
159 // 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 |
160 // output, it'll pass regardless of the system language. | 160 // output, it'll pass regardless of the system language. |
161 ui::ResourceBundle::InitSharedInstanceWithLocale( | 161 ui::ResourceBundle::InitSharedInstanceWithLocale( |
162 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); | 162 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
163 base::FilePath resources_pack_path; | 163 base::FilePath resources_pack_path; |
164 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 164 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
165 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 165 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
166 resources_pack_path, ui::SCALE_FACTOR_NONE); | 166 resources_pack_path, ui::SCALE_FACTOR_NONE); |
167 } | 167 } |
OLD | NEW |