Chromium Code Reviews| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 #endif | 166 #endif |
| 167 | 167 |
| 168 chrome::RegisterPathProvider(); | 168 chrome::RegisterPathProvider(); |
| 169 if (!browser_dir_.empty()) { | 169 if (!browser_dir_.empty()) { |
| 170 PathService::Override(base::DIR_EXE, browser_dir_); | 170 PathService::Override(base::DIR_EXE, browser_dir_); |
| 171 PathService::Override(base::DIR_MODULE, browser_dir_); | 171 PathService::Override(base::DIR_MODULE, browser_dir_); |
| 172 } | 172 } |
| 173 | 173 |
| 174 // Initialize after overriding paths as some content paths depend on correct | 174 // Initialize after overriding paths as some content paths depend on correct |
| 175 // values for DIR_EXE and DIR_MODULE. | 175 // values for DIR_EXE and DIR_MODULE. |
| 176 content::ContentTestSuiteBase::DisableLoadingExternalLibraries(); | |
|
jam
2012/07/23 23:02:40
now you're doing this for all chrome test suites,
glotov
2012/07/24 13:06:55
Done.
| |
| 176 content::ContentTestSuiteBase::Initialize(); | 177 content::ContentTestSuiteBase::Initialize(); |
| 177 | 178 |
| 178 #if defined(OS_MACOSX) | 179 #if defined(OS_MACOSX) |
| 179 // Look in the framework bundle for resources. | 180 // Look in the framework bundle for resources. |
| 180 FilePath path; | 181 FilePath path; |
| 181 PathService::Get(base::DIR_EXE, &path); | 182 PathService::Get(base::DIR_EXE, &path); |
| 182 path = path.Append(chrome::kFrameworkName); | 183 path = path.Append(chrome::kFrameworkName); |
| 183 base::mac::SetOverrideFrameworkBundlePath(path); | 184 base::mac::SetOverrideFrameworkBundlePath(path); |
| 184 #endif | 185 #endif |
| 185 | 186 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 214 #if defined(OS_MACOSX) | 215 #if defined(OS_MACOSX) |
| 215 base::mac::SetOverrideFrameworkBundle(NULL); | 216 base::mac::SetOverrideFrameworkBundle(NULL); |
| 216 #endif | 217 #endif |
| 217 | 218 |
| 218 base::StatsTable::set_current(NULL); | 219 base::StatsTable::set_current(NULL); |
| 219 stats_table_.reset(); | 220 stats_table_.reset(); |
| 220 RemoveSharedMemoryFile(stats_filename_); | 221 RemoveSharedMemoryFile(stats_filename_); |
| 221 | 222 |
| 222 base::TestSuite::Shutdown(); | 223 base::TestSuite::Shutdown(); |
| 223 } | 224 } |
| OLD | NEW |