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

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

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/service/service_process.cc ('k') | components/test/run_all_unittests.cc » ('j') | 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/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
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 }
OLDNEW
« no previous file with comments | « chrome/service/service_process.cc ('k') | components/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698