| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/unit/chrome_test_suite.h" | 5 #include "chrome/test/unit/chrome_test_suite.h" |
| 6 | 6 |
| 7 #include "app/app_paths.h" | 7 #include "app/app_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/mac/scoped_nsautorelease_pool.h" | 9 #include "base/mac/scoped_nsautorelease_pool.h" |
| 10 #include "base/metrics/stats_table.h" | 10 #include "base/metrics/stats_table.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 #if defined(OS_MACOSX) | 92 #if defined(OS_MACOSX) |
| 93 chrome_application_mac::RegisterCrApp(); | 93 chrome_application_mac::RegisterCrApp(); |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 96 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 97 | 97 |
| 98 base::TestSuite::Initialize(); | 98 base::TestSuite::Initialize(); |
| 99 | 99 |
| 100 // Initialize the content client which that code uses to talk to Chrome. | 100 // Initialize the content client which that code uses to talk to Chrome. |
| 101 content::SetContentClient(&chrome_content_client_); | 101 content::SetContentClient(&chrome_content_client_); |
| 102 content::GetContentClient()->set_browser(&chrome_browser_content_client_); |
| 102 | 103 |
| 103 chrome::RegisterChromeSchemes(); | 104 chrome::RegisterChromeSchemes(); |
| 104 host_resolver_proc_ = new LocalHostResolverProc(); | 105 host_resolver_proc_ = new LocalHostResolverProc(); |
| 105 scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); | 106 scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); |
| 106 | 107 |
| 107 chrome::RegisterPathProvider(); | 108 chrome::RegisterPathProvider(); |
| 108 app::RegisterPathProvider(); | 109 app::RegisterPathProvider(); |
| 109 content::RegisterPathProvider(); | 110 content::RegisterPathProvider(); |
| 110 ui::RegisterPathProvider(); | 111 ui::RegisterPathProvider(); |
| 111 g_browser_process = new TestingBrowserProcess; | 112 g_browser_process = new TestingBrowserProcess; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 delete g_browser_process; | 153 delete g_browser_process; |
| 153 g_browser_process = NULL; | 154 g_browser_process = NULL; |
| 154 | 155 |
| 155 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 156 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
| 156 base::StatsTable::set_current(NULL); | 157 base::StatsTable::set_current(NULL); |
| 157 delete stats_table_; | 158 delete stats_table_; |
| 158 RemoveSharedMemoryFile(stats_filename_); | 159 RemoveSharedMemoryFile(stats_filename_); |
| 159 | 160 |
| 160 base::TestSuite::Shutdown(); | 161 base::TestSuite::Shutdown(); |
| 161 } | 162 } |
| OLD | NEW |