Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: chrome/test/base/chrome_unit_test_suite.cc

Issue 1908043002: [Mac] In unit_tests use the resources.pak in the framework bundle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-chrome
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698