| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 InitIOSTestMessageLoop(); | 214 InitIOSTestMessageLoop(); |
| 215 #endif // OS_IOS | 215 #endif // OS_IOS |
| 216 | 216 |
| 217 #if defined(OS_ANDROID) | 217 #if defined(OS_ANDROID) |
| 218 InitAndroidTest(); | 218 InitAndroidTest(); |
| 219 #else | 219 #else |
| 220 // Initialize logging. | 220 // Initialize logging. |
| 221 base::FilePath exe; | 221 base::FilePath exe; |
| 222 PathService::Get(base::FILE_EXE, &exe); | 222 PathService::Get(base::FILE_EXE, &exe); |
| 223 base::FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); | 223 base::FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); |
| 224 logging::InitLogging( | 224 logging::LoggingSettings settings; |
| 225 log_filename.value().c_str(), | 225 settings.logging_dest = logging::LOG_TO_ALL; |
| 226 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, | 226 settings.log_file = log_filename.value().c_str(); |
| 227 logging::LOCK_LOG_FILE, | 227 settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
| 228 logging::DELETE_OLD_LOG_FILE, | 228 logging::InitLogging(settings); |
| 229 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
| 230 // We want process and thread IDs because we may have multiple processes. | 229 // We want process and thread IDs because we may have multiple processes. |
| 231 // Note: temporarily enabled timestamps in an effort to catch bug 6361. | 230 // Note: temporarily enabled timestamps in an effort to catch bug 6361. |
| 232 logging::SetLogItems(true, true, true, true); | 231 logging::SetLogItems(true, true, true, true); |
| 233 #endif // else defined(OS_ANDROID) | 232 #endif // else defined(OS_ANDROID) |
| 234 | 233 |
| 235 CHECK(base::debug::EnableInProcessStackDumping()); | 234 CHECK(base::debug::EnableInProcessStackDumping()); |
| 236 #if defined(OS_WIN) | 235 #if defined(OS_WIN) |
| 237 // Make sure we run with high resolution timer to minimize differences | 236 // Make sure we run with high resolution timer to minimize differences |
| 238 // between production code and test code. | 237 // between production code and test code. |
| 239 base::Time::EnableHighResolutionTimer(true); | 238 base::Time::EnableHighResolutionTimer(true); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 250 icu_util::Initialize(); | 249 icu_util::Initialize(); |
| 251 | 250 |
| 252 CatchMaybeTests(); | 251 CatchMaybeTests(); |
| 253 ResetCommandLine(); | 252 ResetCommandLine(); |
| 254 | 253 |
| 255 TestTimeouts::Initialize(); | 254 TestTimeouts::Initialize(); |
| 256 } | 255 } |
| 257 | 256 |
| 258 void TestSuite::Shutdown() { | 257 void TestSuite::Shutdown() { |
| 259 } | 258 } |
| OLD | NEW |