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