OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef BASE_TEST_TEST_SUITE_H_ | 5 #ifndef BASE_TEST_TEST_SUITE_H_ |
6 #define BASE_TEST_TEST_SUITE_H_ | 6 #define BASE_TEST_TEST_SUITE_H_ |
7 | 7 |
8 // Defines a basic test suite framework for running gtest based tests. You can | 8 // Defines a basic test suite framework for running gtest based tests. You can |
9 // instantiate this class in your main function and call its Run method to run | 9 // instantiate this class in your main function and call its Run method to run |
10 // any gtest based tests that are linked into your executable. | 10 // any gtest based tests that are linked into your executable. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 logging::LOCK_LOG_FILE, | 222 logging::LOCK_LOG_FILE, |
223 logging::DELETE_OLD_LOG_FILE); | 223 logging::DELETE_OLD_LOG_FILE); |
224 // We want process and thread IDs because we may have multiple processes. | 224 // We want process and thread IDs because we may have multiple processes. |
225 // Note: temporarily enabled timestamps in an effort to catch bug 6361. | 225 // Note: temporarily enabled timestamps in an effort to catch bug 6361. |
226 logging::SetLogItems(true, true, true, true); | 226 logging::SetLogItems(true, true, true, true); |
227 | 227 |
228 CHECK(base::EnableInProcessStackDumping()); | 228 CHECK(base::EnableInProcessStackDumping()); |
229 #if defined(OS_WIN) | 229 #if defined(OS_WIN) |
230 // Make sure we run with high resolution timer to minimize differences | 230 // Make sure we run with high resolution timer to minimize differences |
231 // between production code and test code. | 231 // between production code and test code. |
232 bool result = base::Time::UseHighResolutionTimer(true); | 232 base::Time::EnableHighResolutionTimer(true); |
233 CHECK(result); | |
234 #endif // defined(OS_WIN) | 233 #endif // defined(OS_WIN) |
235 | 234 |
236 // In some cases, we do not want to see standard error dialogs. | 235 // In some cases, we do not want to see standard error dialogs. |
237 if (!DebugUtil::BeingDebugged() && | 236 if (!DebugUtil::BeingDebugged() && |
238 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) { | 237 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) { |
239 SuppressErrorDialogs(); | 238 SuppressErrorDialogs(); |
240 DebugUtil::SuppressDialogs(); | 239 DebugUtil::SuppressDialogs(); |
241 logging::SetLogAssertHandler(UnitTestAssertHandler); | 240 logging::SetLogAssertHandler(UnitTestAssertHandler); |
242 } | 241 } |
243 | 242 |
(...skipping 12 matching lines...) Expand all Loading... |
256 | 255 |
257 virtual void Shutdown() { | 256 virtual void Shutdown() { |
258 } | 257 } |
259 | 258 |
260 // Make sure that we setup an AtExitManager so Singleton objects will be | 259 // Make sure that we setup an AtExitManager so Singleton objects will be |
261 // destroyed. | 260 // destroyed. |
262 base::AtExitManager at_exit_manager_; | 261 base::AtExitManager at_exit_manager_; |
263 }; | 262 }; |
264 | 263 |
265 #endif // BASE_TEST_TEST_SUITE_H_ | 264 #endif // BASE_TEST_TEST_SUITE_H_ |
OLD | NEW |