diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 20:56:42 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 20:56:42 +0000 |
commit | 9181302d2e04787087d4770c940fd849109d3438 (patch) | |
tree | e7bae54a0c4b0bd92a425284da7a4afd551ba8b0 /chrome_frame | |
parent | 0afff03fd4a562078a93863bd44f003bafe0ab8e (diff) | |
download | chromium_src-9181302d2e04787087d4770c940fd849109d3438.zip chromium_src-9181302d2e04787087d4770c940fd849109d3438.tar.gz chromium_src-9181302d2e04787087d4770c940fd849109d3438.tar.bz2 |
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
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/run_all_unittests.cc | 13 |
1 files changed, 9 insertions, 4 deletions
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<google_breakpad::ExceptionHandler> breakpad; - google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> 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 |