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

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

Powered by Google App Engine
This is Rietveld 408576698