| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "base/test/test_timeouts.h" | 25 #include "base/test/test_timeouts.h" |
| 26 #include "base/time/time.h" | 26 #include "base/time/time.h" |
| 27 #include "testing/gmock/include/gmock/gmock.h" | 27 #include "testing/gmock/include/gmock/gmock.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 #include "testing/multiprocess_func_list.h" | 29 #include "testing/multiprocess_func_list.h" |
| 30 | 30 |
| 31 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
| 32 #include "base/mac/scoped_nsautorelease_pool.h" | 32 #include "base/mac/scoped_nsautorelease_pool.h" |
| 33 #if defined(OS_IOS) | 33 #if defined(OS_IOS) |
| 34 #include "base/test/test_listener_ios.h" | 34 #include "base/test/test_listener_ios.h" |
| 35 #else | |
| 36 #include "base/test/mock_chrome_application_mac.h" | |
| 37 #endif // OS_IOS | 35 #endif // OS_IOS |
| 38 #endif // OS_MACOSX | 36 #endif // OS_MACOSX |
| 39 | 37 |
| 40 #if defined(OS_ANDROID) | 38 #if defined(OS_ANDROID) |
| 41 #include "base/test/test_support_android.h" | 39 #include "base/test/test_support_android.h" |
| 42 #endif | 40 #endif |
| 43 | 41 |
| 44 #if defined(OS_IOS) | 42 #if defined(OS_IOS) |
| 45 #include "base/test/test_support_ios.h" | 43 #include "base/test/test_support_ios.h" |
| 46 #endif | 44 #endif |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 278 } |
| 281 | 279 |
| 282 void TestSuite::Initialize() { | 280 void TestSuite::Initialize() { |
| 283 #if !defined(OS_IOS) | 281 #if !defined(OS_IOS) |
| 284 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 282 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 285 switches::kWaitForDebugger)) { | 283 switches::kWaitForDebugger)) { |
| 286 base::debug::WaitForDebugger(60, true); | 284 base::debug::WaitForDebugger(60, true); |
| 287 } | 285 } |
| 288 #endif | 286 #endif |
| 289 | 287 |
| 290 #if defined(OS_MACOSX) && !defined(OS_IOS) | |
| 291 // Some of the app unit tests spin runloops. | |
| 292 mock_cr_app::RegisterMockCrApp(); | |
| 293 #endif | |
| 294 | |
| 295 #if defined(OS_IOS) | 288 #if defined(OS_IOS) |
| 296 InitIOSTestMessageLoop(); | 289 InitIOSTestMessageLoop(); |
| 297 #endif // OS_IOS | 290 #endif // OS_IOS |
| 298 | 291 |
| 299 #if defined(OS_ANDROID) | 292 #if defined(OS_ANDROID) |
| 300 InitAndroidTest(); | 293 InitAndroidTest(); |
| 301 #else | 294 #else |
| 302 // Initialize logging. | 295 // Initialize logging. |
| 303 base::FilePath exe; | 296 base::FilePath exe; |
| 304 PathService::Get(base::FILE_EXE, &exe); | 297 PathService::Get(base::FILE_EXE, &exe); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 AddTestLauncherResultPrinter(); | 329 AddTestLauncherResultPrinter(); |
| 337 #endif // !defined(OS_IOS) | 330 #endif // !defined(OS_IOS) |
| 338 | 331 |
| 339 TestTimeouts::Initialize(); | 332 TestTimeouts::Initialize(); |
| 340 | 333 |
| 341 trace_to_file_.BeginTracingFromCommandLineOptions(); | 334 trace_to_file_.BeginTracingFromCommandLineOptions(); |
| 342 } | 335 } |
| 343 | 336 |
| 344 void TestSuite::Shutdown() { | 337 void TestSuite::Shutdown() { |
| 345 } | 338 } |
| OLD | NEW |