OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |