OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_SUITE_H_ | 5 #ifndef BASE_TEST_SUITE_H_ |
6 #define BASE_TEST_SUITE_H_ | 6 #define BASE_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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 logging::DELETE_OLD_LOG_FILE); | 97 logging::DELETE_OLD_LOG_FILE); |
98 // We want process and thread IDs because we may have multiple processes. | 98 // We want process and thread IDs because we may have multiple processes. |
99 // Note: temporarily enabled timestamps in an effort to catch bug 6361. | 99 // Note: temporarily enabled timestamps in an effort to catch bug 6361. |
100 logging::SetLogItems(true, true, true, true); | 100 logging::SetLogItems(true, true, true, true); |
101 | 101 |
102 #if defined(OS_WIN) | 102 #if defined(OS_WIN) |
103 // In some cases, we do not want to see standard error dialogs. | 103 // In some cases, we do not want to see standard error dialogs. |
104 if (!IsDebuggerPresent() && | 104 if (!IsDebuggerPresent() && |
105 !CommandLine::ForCurrentProcess()->HasSwitch(L"show-error-dialogs")) { | 105 !CommandLine::ForCurrentProcess()->HasSwitch(L"show-error-dialogs")) { |
106 SuppressErrorDialogs(); | 106 SuppressErrorDialogs(); |
| 107 #if !defined(PURIFY) |
| 108 // When the code in this file moved around, bug 6436 resurfaced. |
| 109 // As a hack workaround, just #ifdef out this code for Purify builds. |
107 logging::SetLogAssertHandler(UnitTestAssertHandler); | 110 logging::SetLogAssertHandler(UnitTestAssertHandler); |
| 111 #endif |
108 } | 112 } |
109 #endif | 113 #endif |
110 | 114 |
111 icu_util::Initialize(); | 115 icu_util::Initialize(); |
112 } | 116 } |
113 | 117 |
114 virtual void Shutdown() { | 118 virtual void Shutdown() { |
115 } | 119 } |
116 | 120 |
117 // Make sure that we setup an AtExitManager so Singleton objects will be | 121 // Make sure that we setup an AtExitManager so Singleton objects will be |
118 // destroyed. | 122 // destroyed. |
119 base::AtExitManager at_exit_manager_; | 123 base::AtExitManager at_exit_manager_; |
120 }; | 124 }; |
121 | 125 |
122 #endif // BASE_TEST_SUITE_H_ | 126 #endif // BASE_TEST_SUITE_H_ |
123 | 127 |
OLD | NEW |