Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: base/test/test_suite.h

Issue 270062: Use ASCII strings for switch names. (Closed)
Patch Set: victory Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/test/perf_test_suite.h ('k') | chrome/app/chrome_dll_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #endif // OS_POSIX 203 #endif // OS_POSIX
204 204
205 #if defined(OS_WIN) 205 #if defined(OS_WIN)
206 // For unit tests we turn on the high resolution timer and disable 206 // For unit tests we turn on the high resolution timer and disable
207 // base::Time's use of SystemMonitor. Tests create and destroy the message 207 // base::Time's use of SystemMonitor. Tests create and destroy the message
208 // loop, which causes a crash with SystemMonitor (http://crbug.com/12187). 208 // loop, which causes a crash with SystemMonitor (http://crbug.com/12187).
209 base::Time::EnableHiResClockForTests(); 209 base::Time::EnableHiResClockForTests();
210 210
211 // In some cases, we do not want to see standard error dialogs. 211 // In some cases, we do not want to see standard error dialogs.
212 if (!IsDebuggerPresent() && 212 if (!IsDebuggerPresent() &&
213 !CommandLine::ForCurrentProcess()->HasSwitch(L"show-error-dialogs")) { 213 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) {
214 SuppressErrorDialogs(); 214 SuppressErrorDialogs();
215 #if !defined(PURIFY) 215 #if !defined(PURIFY)
216 // When the code in this file moved around, bug 6436 resurfaced. 216 // When the code in this file moved around, bug 6436 resurfaced.
217 // As a hack workaround, just #ifdef out this code for Purify builds. 217 // As a hack workaround, just #ifdef out this code for Purify builds.
218 logging::SetLogAssertHandler(UnitTestAssertHandler); 218 logging::SetLogAssertHandler(UnitTestAssertHandler);
219 #endif // !defined(PURIFY) 219 #endif // !defined(PURIFY)
220 // Add stack dumping support on exception on windows. Similar to OS_POSIX 220 // Add stack dumping support on exception on windows. Similar to OS_POSIX
221 // signal() handling above. 221 // signal() handling above.
222 g_previous_filter = SetUnhandledExceptionFilter(&UnitTestExceptionFilter); 222 g_previous_filter = SetUnhandledExceptionFilter(&UnitTestExceptionFilter);
223 } 223 }
224 #endif // defined(OS_WIN) 224 #endif // defined(OS_WIN)
225 225
226 icu_util::Initialize(); 226 icu_util::Initialize();
227 } 227 }
228 228
229 virtual void Shutdown() { 229 virtual void Shutdown() {
230 } 230 }
231 231
232 // Make sure that we setup an AtExitManager so Singleton objects will be 232 // Make sure that we setup an AtExitManager so Singleton objects will be
233 // destroyed. 233 // destroyed.
234 base::AtExitManager at_exit_manager_; 234 base::AtExitManager at_exit_manager_;
235 }; 235 };
236 236
237 #endif // BASE_TEST_SUITE_H_ 237 #endif // BASE_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « base/test/perf_test_suite.h ('k') | chrome/app/chrome_dll_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698