OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 UINT existing_flags = SetErrorMode(new_flags); | 168 UINT existing_flags = SetErrorMode(new_flags); |
169 SetErrorMode(existing_flags | new_flags); | 169 SetErrorMode(existing_flags | new_flags); |
170 #endif // defined(OS_WIN) | 170 #endif // defined(OS_WIN) |
171 } | 171 } |
172 | 172 |
173 void TestSuite::Initialize() { | 173 void TestSuite::Initialize() { |
174 // Initialize logging. | 174 // Initialize logging. |
175 FilePath exe; | 175 FilePath exe; |
176 PathService::Get(base::FILE_EXE, &exe); | 176 PathService::Get(base::FILE_EXE, &exe); |
177 FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); | 177 FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); |
178 logging::InitLogging(log_filename.value().c_str(), | 178 logging::InitLogging( |
179 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, | 179 log_filename.value().c_str(), |
180 logging::LOCK_LOG_FILE, | 180 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, |
181 logging::DELETE_OLD_LOG_FILE); | 181 logging::LOCK_LOG_FILE, |
| 182 logging::DELETE_OLD_LOG_FILE, |
| 183 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
182 // We want process and thread IDs because we may have multiple processes. | 184 // We want process and thread IDs because we may have multiple processes. |
183 // Note: temporarily enabled timestamps in an effort to catch bug 6361. | 185 // Note: temporarily enabled timestamps in an effort to catch bug 6361. |
184 logging::SetLogItems(true, true, true, true); | 186 logging::SetLogItems(true, true, true, true); |
185 | 187 |
186 CHECK(base::EnableInProcessStackDumping()); | 188 CHECK(base::EnableInProcessStackDumping()); |
187 #if defined(OS_WIN) | 189 #if defined(OS_WIN) |
188 // Make sure we run with high resolution timer to minimize differences | 190 // Make sure we run with high resolution timer to minimize differences |
189 // between production code and test code. | 191 // between production code and test code. |
190 base::Time::EnableHighResolutionTimer(true); | 192 base::Time::EnableHighResolutionTimer(true); |
191 #endif // defined(OS_WIN) | 193 #endif // defined(OS_WIN) |
(...skipping 16 matching lines...) Expand all Loading... |
208 base::EnsureNSSInit(); | 210 base::EnsureNSSInit(); |
209 #endif // defined(USE_NSS) | 211 #endif // defined(USE_NSS) |
210 | 212 |
211 CatchMaybeTests(); | 213 CatchMaybeTests(); |
212 | 214 |
213 TestTimeouts::Initialize(); | 215 TestTimeouts::Initialize(); |
214 } | 216 } |
215 | 217 |
216 void TestSuite::Shutdown() { | 218 void TestSuite::Shutdown() { |
217 } | 219 } |
OLD | NEW |