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 "base/test/test_suite.h" | 5 #include "base/test/test_suite.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 Initialize(); | 148 Initialize(); |
149 std::string client_func = | 149 std::string client_func = |
150 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 150 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
151 switches::kTestChildProcess); | 151 switches::kTestChildProcess); |
152 | 152 |
153 // Check to see if we are being run as a client process. | 153 // Check to see if we are being run as a client process. |
154 if (!client_func.empty()) | 154 if (!client_func.empty()) |
155 return multi_process_function_list::InvokeChildProcessTest(client_func); | 155 return multi_process_function_list::InvokeChildProcessTest(client_func); |
156 #if defined(OS_IOS) | 156 #if defined(OS_IOS) |
157 base::test_listener_ios::RegisterTestEndListener(); | 157 base::test_listener_ios::RegisterTestEndListener(); |
| 158 base::test_listener_ios::RegisterNSLogListenerIfNecessary(); |
158 #endif | 159 #endif |
159 int result = RUN_ALL_TESTS(); | 160 int result = RUN_ALL_TESTS(); |
160 | 161 |
161 #if defined(OS_MACOSX) | 162 #if defined(OS_MACOSX) |
162 // This MUST happen before Shutdown() since Shutdown() tears down | 163 // This MUST happen before Shutdown() since Shutdown() tears down |
163 // objects (such as NotificationService::current()) that Cocoa | 164 // objects (such as NotificationService::current()) that Cocoa |
164 // objects use to remove themselves as observers. | 165 // objects use to remove themselves as observers. |
165 scoped_pool.Recycle(); | 166 scoped_pool.Recycle(); |
166 #endif | 167 #endif |
167 | 168 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 icu_util::Initialize(); | 243 icu_util::Initialize(); |
243 | 244 |
244 CatchMaybeTests(); | 245 CatchMaybeTests(); |
245 ResetCommandLine(); | 246 ResetCommandLine(); |
246 | 247 |
247 TestTimeouts::Initialize(); | 248 TestTimeouts::Initialize(); |
248 } | 249 } |
249 | 250 |
250 void TestSuite::Shutdown() { | 251 void TestSuite::Shutdown() { |
251 } | 252 } |
OLD | NEW |