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 22 matching lines...) Expand all Loading... |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 #include "testing/multiprocess_func_list.h" | 34 #include "testing/multiprocess_func_list.h" |
35 | 35 |
36 #if defined(OS_MACOSX) | 36 #if defined(OS_MACOSX) |
37 #include "base/mac/scoped_nsautorelease_pool.h" | 37 #include "base/mac/scoped_nsautorelease_pool.h" |
38 #if defined(OS_IOS) | 38 #if defined(OS_IOS) |
39 #include "base/test/test_listener_ios.h" | 39 #include "base/test/test_listener_ios.h" |
40 #endif // OS_IOS | 40 #endif // OS_IOS |
41 #endif // OS_MACOSX | 41 #endif // OS_MACOSX |
42 | 42 |
43 #if defined(OS_WIN) | 43 #if !defined(OS_WIN) |
44 #include "base/debug/close_handle_hook_win.h" | |
45 #include "base/win/windows_version.h" | |
46 #else | |
47 #include "base/i18n/rtl.h" | 44 #include "base/i18n/rtl.h" |
48 #if !defined(OS_IOS) | 45 #if !defined(OS_IOS) |
49 #include "base/strings/string_util.h" | 46 #include "base/strings/string_util.h" |
50 #include "third_party/icu/source/common/unicode/uloc.h" | 47 #include "third_party/icu/source/common/unicode/uloc.h" |
51 #endif | 48 #endif |
52 #endif | 49 #endif |
53 | 50 |
54 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
55 #include "base/test/test_support_android.h" | 52 #include "base/test/test_support_android.h" |
56 #endif | 53 #endif |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 settings.log_file = log_filename.value().c_str(); | 310 settings.log_file = log_filename.value().c_str(); |
314 settings.delete_old = logging::DELETE_OLD_LOG_FILE; | 311 settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
315 logging::InitLogging(settings); | 312 logging::InitLogging(settings); |
316 // We want process and thread IDs because we may have multiple processes. | 313 // We want process and thread IDs because we may have multiple processes. |
317 // Note: temporarily enabled timestamps in an effort to catch bug 6361. | 314 // Note: temporarily enabled timestamps in an effort to catch bug 6361. |
318 logging::SetLogItems(true, true, true, true); | 315 logging::SetLogItems(true, true, true, true); |
319 #endif // else defined(OS_ANDROID) | 316 #endif // else defined(OS_ANDROID) |
320 | 317 |
321 CHECK(debug::EnableInProcessStackDumping()); | 318 CHECK(debug::EnableInProcessStackDumping()); |
322 #if defined(OS_WIN) | 319 #if defined(OS_WIN) |
323 base::debug::InstallHandleHooks(); | |
324 | |
325 RouteStdioToConsole(true); | 320 RouteStdioToConsole(true); |
326 // Make sure we run with high resolution timer to minimize differences | 321 // Make sure we run with high resolution timer to minimize differences |
327 // between production code and test code. | 322 // between production code and test code. |
328 Time::EnableHighResolutionTimer(true); | 323 Time::EnableHighResolutionTimer(true); |
329 #endif // defined(OS_WIN) | 324 #endif // defined(OS_WIN) |
330 | 325 |
331 // In some cases, we do not want to see standard error dialogs. | 326 // In some cases, we do not want to see standard error dialogs. |
332 if (!debug::BeingDebugged() && | 327 if (!debug::BeingDebugged() && |
333 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) { | 328 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) { |
334 SuppressErrorDialogs(); | 329 SuppressErrorDialogs(); |
(...skipping 25 matching lines...) Expand all Loading... |
360 | 355 |
361 TestTimeouts::Initialize(); | 356 TestTimeouts::Initialize(); |
362 | 357 |
363 trace_to_file_.BeginTracingFromCommandLineOptions(); | 358 trace_to_file_.BeginTracingFromCommandLineOptions(); |
364 } | 359 } |
365 | 360 |
366 void TestSuite::Shutdown() { | 361 void TestSuite::Shutdown() { |
367 } | 362 } |
368 | 363 |
369 } // namespace base | 364 } // namespace base |
OLD | NEW |