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" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 gfx::GLSurface::InitializeOneOffForTests(); | 139 gfx::GLSurface::InitializeOneOffForTests(); |
140 | 140 |
141 omaha_query_params::OmahaQueryParams::SetDelegate( | 141 omaha_query_params::OmahaQueryParams::SetDelegate( |
142 ChromeOmahaQueryParamsDelegate::GetInstance()); | 142 ChromeOmahaQueryParamsDelegate::GetInstance()); |
143 #endif | 143 #endif |
144 } | 144 } |
145 | 145 |
146 void ChromeUnitTestSuite::InitializeResourceBundle() { | 146 void ChromeUnitTestSuite::InitializeResourceBundle() { |
147 // Force unittests to run using en-US so if we test against string | 147 // Force unittests to run using en-US so if we test against string |
148 // output, it'll pass regardless of the system language. | 148 // output, it'll pass regardless of the system language. |
149 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 149 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 150 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
150 base::FilePath resources_pack_path; | 151 base::FilePath resources_pack_path; |
151 #if defined(OS_MACOSX) && !defined(OS_IOS) | 152 #if defined(OS_MACOSX) && !defined(OS_IOS) |
152 PathService::Get(base::DIR_MODULE, &resources_pack_path); | 153 PathService::Get(base::DIR_MODULE, &resources_pack_path); |
153 resources_pack_path = | 154 resources_pack_path = |
154 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); | 155 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); |
155 #else | 156 #else |
156 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 157 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
157 #endif | 158 #endif |
158 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 159 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
159 resources_pack_path, ui::SCALE_FACTOR_NONE); | 160 resources_pack_path, ui::SCALE_FACTOR_NONE); |
160 } | 161 } |
OLD | NEW |