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

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

Issue 486193003: Support --wait-for-debugger in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 10 #include "base/bind.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Suppress the "Debug Assertion Failed" dialog. 274 // Suppress the "Debug Assertion Failed" dialog.
275 // TODO(hbono): remove this code when gtest has it. 275 // TODO(hbono): remove this code when gtest has it.
276 // http://groups.google.com/d/topic/googletestframework/OjuwNlXy5ac/discussion 276 // http://groups.google.com/d/topic/googletestframework/OjuwNlXy5ac/discussion
277 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); 277 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
278 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 278 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
279 #endif // defined(_DEBUG) && defined(_HAS_EXCEPTIONS) && (_HAS_EXCEPTIONS == 1) 279 #endif // defined(_DEBUG) && defined(_HAS_EXCEPTIONS) && (_HAS_EXCEPTIONS == 1)
280 #endif // defined(OS_WIN) 280 #endif // defined(OS_WIN)
281 } 281 }
282 282
283 void TestSuite::Initialize() { 283 void TestSuite::Initialize() {
284 #if !defined(OS_IOS)
285 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
286 switches::kWaitForDebugger)) {
287 base::debug::WaitForDebugger(60, true);
288 }
289 #endif
290
284 #if defined(OS_MACOSX) && !defined(OS_IOS) 291 #if defined(OS_MACOSX) && !defined(OS_IOS)
285 // Some of the app unit tests spin runloops. 292 // Some of the app unit tests spin runloops.
286 mock_cr_app::RegisterMockCrApp(); 293 mock_cr_app::RegisterMockCrApp();
287 #endif 294 #endif
288 295
289 #if defined(OS_IOS) 296 #if defined(OS_IOS)
290 InitIOSTestMessageLoop(); 297 InitIOSTestMessageLoop();
291 #endif // OS_IOS 298 #endif // OS_IOS
292 299
293 #if defined(OS_ANDROID) 300 #if defined(OS_ANDROID)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 ResetCommandLine(); 335 ResetCommandLine();
329 #if !defined(OS_IOS) 336 #if !defined(OS_IOS)
330 AddTestLauncherResultPrinter(); 337 AddTestLauncherResultPrinter();
331 #endif // !defined(OS_IOS) 338 #endif // !defined(OS_IOS)
332 339
333 TestTimeouts::Initialize(); 340 TestTimeouts::Initialize();
334 } 341 }
335 342
336 void TestSuite::Shutdown() { 343 void TestSuite::Shutdown() {
337 } 344 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698