From 9181302d2e04787087d4770c940fd849109d3438 Mon Sep 17 00:00:00 2001 From: "grt@chromium.org" Date: Fri, 6 Jan 2012 20:56:42 +0000 Subject: Allow crash reporting for GCF integration tests to be suppressed via command line. This makes debugging easier for developers, since crashes will start the postmortem debugger. BUG=none TEST=none Review URL: http://codereview.chromium.org/9123008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116735 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/test/run_all_unittests.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'chrome_frame') diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc index d13376e..a0f7973 100644 --- a/chrome_frame/test/run_all_unittests.cc +++ b/chrome_frame/test/run_all_unittests.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -26,6 +26,7 @@ class ChromeFrameUnittestsModule ChromeFrameUnittestsModule _AtlModule; +const char kNoCrashService[] = "no-crash-service"; const char kNoRegistrationSwitch[] = "no-registration"; void PureCall() { @@ -43,10 +44,14 @@ int main(int argc, char **argv) { SetConfigBool(kChromeFrameHeadlessMode, true); SetConfigBool(kChromeFrameAccessibleMode, true); - base::ProcessHandle crash_service = chrome_frame_test::StartCrashService(); + base::ProcessHandle crash_service = NULL; + google_breakpad::scoped_ptr breakpad; - google_breakpad::scoped_ptr breakpad( - InitializeCrashReporting(HEADLESS)); + if (!CommandLine::ForCurrentProcess()->HasSwitch(kNoCrashService)) { + crash_service = chrome_frame_test::StartCrashService(); + + breakpad.reset(InitializeCrashReporting(HEADLESS)); + } int ret = -1; // If mini_installer is used to register CF, we use the switch -- cgit v1.1