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

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

Issue 3945002: Move debug-related stuff from base to the base/debug directory and use the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « base/test/perf_test_suite.cc ('k') | base/trace_event.h » ('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 #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"
11 #include "base/debug_on_start.h" 11 #include "base/debug_on_start.h"
12 #include "base/debug_util.h" 12 #include "base/debug_util.h"
13 #include "base/debug/debugger.h"
14 #include "base/debug/debugger.h"
13 #include "base/file_path.h" 15 #include "base/file_path.h"
14 #include "base/i18n/icu_util.h" 16 #include "base/i18n/icu_util.h"
15 #include "base/logging.h" 17 #include "base/logging.h"
16 #include "base/mac/scoped_nsautorelease_pool.h" 18 #include "base/mac/scoped_nsautorelease_pool.h"
17 #include "base/nss_util.h" 19 #include "base/nss_util.h"
18 #include "base/path_service.h" 20 #include "base/path_service.h"
19 #include "base/process_util.h" 21 #include "base/process_util.h"
20 #include "base/scoped_ptr.h" 22 #include "base/scoped_ptr.h"
21 #include "base/test/multiprocess_test.h" 23 #include "base/test/multiprocess_test.h"
22 #include "base/test/test_timeouts.h" 24 #include "base/test/test_timeouts.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
192 194
193 // In some cases, we do not want to see standard error dialogs. 195 // In some cases, we do not want to see standard error dialogs.
194 if (!DebugUtil::BeingDebugged() && 196 if (!base::debug::BeingDebugged() &&
195 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) { 197 !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) {
196 SuppressErrorDialogs(); 198 SuppressErrorDialogs();
197 DebugUtil::SuppressDialogs(); 199 DebugUtil::SuppressDialogs();
198 logging::SetLogAssertHandler(UnitTestAssertHandler); 200 logging::SetLogAssertHandler(UnitTestAssertHandler);
199 } 201 }
200 202
201 icu_util::Initialize(); 203 icu_util::Initialize();
202 204
203 #if defined(USE_NSS) 205 #if defined(USE_NSS)
204 // Trying to repeatedly initialize and cleanup NSS and NSPR may result in 206 // Trying to repeatedly initialize and cleanup NSS and NSPR may result in
205 // a deadlock. Such repeated initialization will happen when using test 207 // a deadlock. Such repeated initialization will happen when using test
206 // isolation. Prevent problems by initializing NSS here, so that the cleanup 208 // isolation. Prevent problems by initializing NSS here, so that the cleanup
207 // will be done only on process exit. 209 // will be done only on process exit.
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 }
OLDNEW
« no previous file with comments | « base/test/perf_test_suite.cc ('k') | base/trace_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698