| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 update_client::UpdateQueryParams::SetDelegate( | 153 update_client::UpdateQueryParams::SetDelegate( |
| 154 ChromeUpdateQueryParamsDelegate::GetInstance()); | 154 ChromeUpdateQueryParamsDelegate::GetInstance()); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void ChromeUnitTestSuite::InitializeResourceBundle() { | 157 void ChromeUnitTestSuite::InitializeResourceBundle() { |
| 158 // Force unittests to run using en-US so if we test against string | 158 // Force unittests to run using en-US so if we test against string |
| 159 // output, it'll pass regardless of the system language. | 159 // output, it'll pass regardless of the system language. |
| 160 ui::ResourceBundle::InitSharedInstanceWithLocale( | 160 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 161 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); | 161 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
| 162 base::FilePath resources_pack_path; | 162 base::FilePath resources_pack_path; |
| 163 #if defined(OS_MACOSX) | |
| 164 PathService::Get(base::DIR_MODULE, &resources_pack_path); | |
| 165 resources_pack_path = | |
| 166 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); | |
| 167 #else | |
| 168 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 163 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 169 #endif | |
| 170 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 164 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
| 171 resources_pack_path, ui::SCALE_FACTOR_NONE); | 165 resources_pack_path, ui::SCALE_FACTOR_NONE); |
| 172 } | 166 } |
| OLD | NEW |