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 __debugbreak(); | |
Will Harris
2016/01/22 18:30:39
would help if I removed my debugging __debugbreak(
Will Harris
2016/01/22 21:58:23
Done.
| |
324 #if defined(_DEBUG) | |
325 // Handle hooks cause shutdown asserts in Debug on Windows 7. crbug.com/571304 | |
326 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | |
327 base::debug::InstallHandleHooks(); | |
328 #else | |
329 base::debug::InstallHandleHooks(); | |
330 #endif | |
331 | |
320 RouteStdioToConsole(true); | 332 RouteStdioToConsole(true); |
321 // Make sure we run with high resolution timer to minimize differences | 333 // Make sure we run with high resolution timer to minimize differences |
322 // between production code and test code. | 334 // between production code and test code. |
323 Time::EnableHighResolutionTimer(true); | 335 Time::EnableHighResolutionTimer(true); |
324 #endif // defined(OS_WIN) | 336 #endif // defined(OS_WIN) |
325 | 337 |
326 // In some cases, we do not want to see standard error dialogs. | 338 // In some cases, we do not want to see standard error dialogs. |
327 if (!debug::BeingDebugged() && | 339 if (!debug::BeingDebugged() && |
328 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) { | 340 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) { |
329 SuppressErrorDialogs(); | 341 SuppressErrorDialogs(); |
(...skipping 25 matching lines...) Expand all Loading... | |
355 | 367 |
356 TestTimeouts::Initialize(); | 368 TestTimeouts::Initialize(); |
357 | 369 |
358 trace_to_file_.BeginTracingFromCommandLineOptions(); | 370 trace_to_file_.BeginTracingFromCommandLineOptions(); |
359 } | 371 } |
360 | 372 |
361 void TestSuite::Shutdown() { | 373 void TestSuite::Shutdown() { |
362 } | 374 } |
363 | 375 |
364 } // namespace base | 376 } // namespace base |
OLD | NEW |