| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 159 } |
| 160 | 160 |
| 161 void ChromeTestSuite::Initialize() { | 161 void ChromeTestSuite::Initialize() { |
| 162 #if defined(OS_MACOSX) | 162 #if defined(OS_MACOSX) |
| 163 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 163 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 164 chrome_browser_application_mac::RegisterBrowserCrApp(); | 164 chrome_browser_application_mac::RegisterBrowserCrApp(); |
| 165 #endif | 165 #endif |
| 166 | 166 |
| 167 base::TestSuite::Initialize(); | 167 base::TestSuite::Initialize(); |
| 168 | 168 |
| 169 chrome::RegisterChromeSchemes(); | 169 chrome::ChromeContentClient client_for_init; |
| 170 content::SetContentClient(&client_for_init); |
| 171 content::RegisterContentSchemes(false); |
| 172 content::SetContentClient(NULL); |
| 170 | 173 |
| 171 chrome::RegisterPathProvider(); | 174 chrome::RegisterPathProvider(); |
| 172 content::RegisterPathProvider(); | 175 content::RegisterPathProvider(); |
| 173 ui::RegisterPathProvider(); | 176 ui::RegisterPathProvider(); |
| 174 | 177 |
| 175 if (!browser_dir_.empty()) { | 178 if (!browser_dir_.empty()) { |
| 176 PathService::Override(base::DIR_EXE, browser_dir_); | 179 PathService::Override(base::DIR_EXE, browser_dir_); |
| 177 PathService::Override(base::DIR_MODULE, browser_dir_); | 180 PathService::Override(base::DIR_MODULE, browser_dir_); |
| 178 } | 181 } |
| 179 | 182 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 #if defined(OS_MACOSX) | 217 #if defined(OS_MACOSX) |
| 215 base::mac::SetOverrideFrameworkBundle(NULL); | 218 base::mac::SetOverrideFrameworkBundle(NULL); |
| 216 #endif | 219 #endif |
| 217 | 220 |
| 218 base::StatsTable::set_current(NULL); | 221 base::StatsTable::set_current(NULL); |
| 219 stats_table_.reset(); | 222 stats_table_.reset(); |
| 220 RemoveSharedMemoryFile(stats_filename_); | 223 RemoveSharedMemoryFile(stats_filename_); |
| 221 | 224 |
| 222 base::TestSuite::Shutdown(); | 225 base::TestSuite::Shutdown(); |
| 223 } | 226 } |
| OLD | NEW |