| 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 "chrome/test/base/chrome_test_suite.h" | 5 #include "chrome/test/base/chrome_test_suite.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/metrics/stats_table.h" | 10 #include "base/metrics/stats_table.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 #if defined(OS_MACOSX) | 188 #if defined(OS_MACOSX) |
| 189 // Look in the framework bundle for resources. | 189 // Look in the framework bundle for resources. |
| 190 FilePath path; | 190 FilePath path; |
| 191 PathService::Get(base::DIR_EXE, &path); | 191 PathService::Get(base::DIR_EXE, &path); |
| 192 path = path.Append(chrome::kFrameworkName); | 192 path = path.Append(chrome::kFrameworkName); |
| 193 base::mac::SetOverrideFrameworkBundlePath(path); | 193 base::mac::SetOverrideFrameworkBundlePath(path); |
| 194 #endif | 194 #endif |
| 195 | 195 |
| 196 // Force unittests to run using en-US so if we test against string | 196 // Force unittests to run using en-US so if we test against string |
| 197 // output, it'll pass regardless of the system language. | 197 // output, it'll pass regardless of the system language. |
| 198 ResourceBundle::InitSharedInstanceWithLocale("en-US"); | 198 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
| 199 FilePath resources_pack_path; | 199 FilePath resources_pack_path; |
| 200 PathService::Get(base::DIR_MODULE, &resources_pack_path); | 200 PathService::Get(base::DIR_MODULE, &resources_pack_path); |
| 201 resources_pack_path = | 201 resources_pack_path = |
| 202 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); | 202 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); |
| 203 ResourceBundle::GetSharedInstance().AddDataPack( | 203 ResourceBundle::GetSharedInstance().AddDataPack( |
| 204 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); | 204 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); |
| 205 | 205 |
| 206 // Mock out the compositor on platforms that use it. | 206 // Mock out the compositor on platforms that use it. |
| 207 ui::SetupTestCompositor(); | 207 ui::SetupTestCompositor(); |
| 208 | 208 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 223 #if defined(OS_MACOSX) | 223 #if defined(OS_MACOSX) |
| 224 base::mac::SetOverrideFrameworkBundle(NULL); | 224 base::mac::SetOverrideFrameworkBundle(NULL); |
| 225 #endif | 225 #endif |
| 226 | 226 |
| 227 base::StatsTable::set_current(NULL); | 227 base::StatsTable::set_current(NULL); |
| 228 stats_table_.reset(); | 228 stats_table_.reset(); |
| 229 RemoveSharedMemoryFile(stats_filename_); | 229 RemoveSharedMemoryFile(stats_filename_); |
| 230 | 230 |
| 231 base::TestSuite::Shutdown(); | 231 base::TestSuite::Shutdown(); |
| 232 } | 232 } |
| OLD | NEW |