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

Side by Side Diff: components/test/run_all_unittests.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/test/base/chrome_unit_test_suite.cc ('k') | content/public/test/render_view_test.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/metrics/statistics_recorder.h" 7 #include "base/metrics/statistics_recorder.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #error Unknown branding 69 #error Unknown branding
70 #endif 70 #endif
71 71
72 base::mac::SetOverrideFrameworkBundlePath(path); 72 base::mac::SetOverrideFrameworkBundlePath(path);
73 #endif 73 #endif
74 74
75 ui::RegisterPathProvider(); 75 ui::RegisterPathProvider();
76 76
77 // TODO(tfarina): This should be changed to InitSharedInstanceWithPakFile() 77 // TODO(tfarina): This should be changed to InitSharedInstanceWithPakFile()
78 // so we can load our pak file instead of chrome.pak. crbug.com/348563 78 // so we can load our pak file instead of chrome.pak. crbug.com/348563
79 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 79 ui::ResourceBundle::InitSharedInstanceWithLocale(
80 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
80 base::FilePath resources_pack_path; 81 base::FilePath resources_pack_path;
81 PathService::Get(base::DIR_MODULE, &resources_pack_path); 82 PathService::Get(base::DIR_MODULE, &resources_pack_path);
82 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( 83 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
83 resources_pack_path.AppendASCII("resources.pak"), 84 resources_pack_path.AppendASCII("resources.pak"),
84 ui::SCALE_FACTOR_NONE); 85 ui::SCALE_FACTOR_NONE);
85 } 86 }
86 87
87 virtual void Shutdown() OVERRIDE { 88 virtual void Shutdown() OVERRIDE {
88 ui::ResourceBundle::CleanupSharedInstance(); 89 ui::ResourceBundle::CleanupSharedInstance();
89 90
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // The listener will set up common test environment for all components unit 125 // The listener will set up common test environment for all components unit
125 // tests. 126 // tests.
126 testing::TestEventListeners& listeners = 127 testing::TestEventListeners& listeners =
127 testing::UnitTest::GetInstance()->listeners(); 128 testing::UnitTest::GetInstance()->listeners();
128 listeners.Append(new ComponentsUnitTestEventListener()); 129 listeners.Append(new ComponentsUnitTestEventListener());
129 130
130 return base::LaunchUnitTests( 131 return base::LaunchUnitTests(
131 argc, argv, base::Bind(&base::TestSuite::Run, 132 argc, argv, base::Bind(&base::TestSuite::Run,
132 base::Unretained(&test_suite))); 133 base::Unretained(&test_suite)));
133 } 134 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_unit_test_suite.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698