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/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 13 matching lines...) Expand all Loading... |
24 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
25 #include "net/base/net_util.h" | 25 #include "net/base/net_util.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
28 #include "ui/base/ui_base_paths.h" | 28 #include "ui/base/ui_base_paths.h" |
29 #include "ui/gfx/test/gfx_test_utils.h" | 29 #include "ui/gfx/test/gfx_test_utils.h" |
30 | 30 |
31 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
32 #include "base/mac/mac_util.h" | 32 #include "base/mac/mac_util.h" |
33 #include "base/mac/scoped_nsautorelease_pool.h" | 33 #include "base/mac/scoped_nsautorelease_pool.h" |
34 #include "content/common/chrome_application_mac.h" | 34 #include "chrome/browser/chrome_browser_application_mac.h" |
35 #endif | 35 #endif |
36 | 36 |
37 #if defined(OS_POSIX) | 37 #if defined(OS_POSIX) |
38 #include "base/shared_memory.h" | 38 #include "base/shared_memory.h" |
39 #endif | 39 #endif |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 void RemoveSharedMemoryFile(const std::string& filename) { | 43 void RemoveSharedMemoryFile(const std::string& filename) { |
44 // Stats uses SharedMemory under the hood. On posix, this results in a file | 44 // Stats uses SharedMemory under the hood. On posix, this results in a file |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 ChromeTestSuite::ChromeTestSuite(int argc, char** argv) | 152 ChromeTestSuite::ChromeTestSuite(int argc, char** argv) |
153 : base::TestSuite(argc, argv) { | 153 : base::TestSuite(argc, argv) { |
154 } | 154 } |
155 | 155 |
156 ChromeTestSuite::~ChromeTestSuite() { | 156 ChromeTestSuite::~ChromeTestSuite() { |
157 } | 157 } |
158 | 158 |
159 void ChromeTestSuite::Initialize() { | 159 void ChromeTestSuite::Initialize() { |
160 #if defined(OS_MACOSX) | 160 #if defined(OS_MACOSX) |
161 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 161 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
162 chrome_application_mac::RegisterCrApp(); | 162 chrome_browser_application_mac::RegisterBrowserCrApp(); |
163 #endif | 163 #endif |
164 | 164 |
165 base::TestSuite::Initialize(); | 165 base::TestSuite::Initialize(); |
166 | 166 |
167 chrome::RegisterChromeSchemes(); | 167 chrome::RegisterChromeSchemes(); |
168 | 168 |
169 chrome::RegisterPathProvider(); | 169 chrome::RegisterPathProvider(); |
170 content::RegisterPathProvider(); | 170 content::RegisterPathProvider(); |
171 ui::RegisterPathProvider(); | 171 ui::RegisterPathProvider(); |
172 | 172 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 #if defined(OS_MACOSX) | 212 #if defined(OS_MACOSX) |
213 base::mac::SetOverrideAppBundle(NULL); | 213 base::mac::SetOverrideAppBundle(NULL); |
214 #endif | 214 #endif |
215 | 215 |
216 base::StatsTable::set_current(NULL); | 216 base::StatsTable::set_current(NULL); |
217 stats_table_.reset(); | 217 stats_table_.reset(); |
218 RemoveSharedMemoryFile(stats_filename_); | 218 RemoveSharedMemoryFile(stats_filename_); |
219 | 219 |
220 base::TestSuite::Shutdown(); | 220 base::TestSuite::Shutdown(); |
221 } | 221 } |
OLD | NEW |