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/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/mac/scoped_nsautorelease_pool.h" | 8 #include "base/mac/scoped_nsautorelease_pool.h" |
9 #include "base/metrics/stats_table.h" | 9 #include "base/metrics/stats_table.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 content::GetContentClient()->set_browser(&chrome_browser_content_client_); | 104 content::GetContentClient()->set_browser(&chrome_browser_content_client_); |
105 | 105 |
106 chrome::RegisterChromeSchemes(); | 106 chrome::RegisterChromeSchemes(); |
107 host_resolver_proc_ = new LocalHostResolverProc(); | 107 host_resolver_proc_ = new LocalHostResolverProc(); |
108 scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); | 108 scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); |
109 | 109 |
110 chrome::RegisterPathProvider(); | 110 chrome::RegisterPathProvider(); |
111 content::RegisterPathProvider(); | 111 content::RegisterPathProvider(); |
112 ui::RegisterPathProvider(); | 112 ui::RegisterPathProvider(); |
113 | 113 |
114 #if !defined(OS_WIN) | 114 #if !defined(OS_WIN) && !defined(OS_LINUX) |
115 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. | 115 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. |
116 g_browser_process = new TestingBrowserProcess; | 116 g_browser_process = new TestingBrowserProcess; |
117 #endif | 117 #endif |
118 | 118 |
119 if (!browser_dir_.empty()) { | 119 if (!browser_dir_.empty()) { |
120 PathService::Override(base::DIR_EXE, browser_dir_); | 120 PathService::Override(base::DIR_EXE, browser_dir_); |
121 PathService::Override(base::DIR_MODULE, browser_dir_); | 121 PathService::Override(base::DIR_MODULE, browser_dir_); |
122 } | 122 } |
123 | 123 |
124 #if defined(OS_MACOSX) | 124 #if defined(OS_MACOSX) |
(...skipping 28 matching lines...) Expand all Loading... |
153 #endif | 153 #endif |
154 } | 154 } |
155 | 155 |
156 void ChromeTestSuite::Shutdown() { | 156 void ChromeTestSuite::Shutdown() { |
157 ResourceBundle::CleanupSharedInstance(); | 157 ResourceBundle::CleanupSharedInstance(); |
158 | 158 |
159 #if defined(OS_MACOSX) | 159 #if defined(OS_MACOSX) |
160 base::mac::SetOverrideAppBundle(NULL); | 160 base::mac::SetOverrideAppBundle(NULL); |
161 #endif | 161 #endif |
162 | 162 |
163 #if !defined(OS_WIN) | 163 #if !defined(OS_WIN) && !defined(OS_LINUX) |
164 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. | 164 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. |
165 delete g_browser_process; | 165 delete g_browser_process; |
166 g_browser_process = NULL; | 166 g_browser_process = NULL; |
167 #endif | 167 #endif |
168 | 168 |
169 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 169 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
170 base::StatsTable::set_current(NULL); | 170 base::StatsTable::set_current(NULL); |
171 delete stats_table_; | 171 delete stats_table_; |
172 RemoveSharedMemoryFile(stats_filename_); | 172 RemoveSharedMemoryFile(stats_filename_); |
173 | 173 |
174 base::TestSuite::Shutdown(); | 174 base::TestSuite::Shutdown(); |
175 } | 175 } |
OLD | NEW |