diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 17:08:24 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 17:08:24 +0000 |
commit | 2e1101f030285d73640c7205a21d1da243517a3d (patch) | |
tree | 214eaf791cf202c3a5071e17b66493f395735911 /chrome_frame/chrome_frame_unittest_main.cc | |
parent | 17e5241835f20fb8412acf1762b5ce84f7a68353 (diff) | |
download | chromium_src-2e1101f030285d73640c7205a21d1da243517a3d.zip chromium_src-2e1101f030285d73640c7205a21d1da243517a3d.tar.gz chromium_src-2e1101f030285d73640c7205a21d1da243517a3d.tar.bz2 |
Enable crash reporting for chrome frame unit tests. This ensures that crashes are reported for
chrome frame unit test runs.
BUG=86846
TEST=Crash dumps are reported when running Chrome Frame unit tests in headless mode.
Review URL: http://codereview.chromium.org/7259009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_unittest_main.cc')
-rw-r--r-- | chrome_frame/chrome_frame_unittest_main.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_unittest_main.cc b/chrome_frame/chrome_frame_unittest_main.cc index 4050f9b..14042b0 100644 --- a/chrome_frame/chrome_frame_unittest_main.cc +++ b/chrome_frame/chrome_frame_unittest_main.cc @@ -6,6 +6,9 @@ #include <atlcom.h> #include "base/at_exit.h" #include "base/command_line.h" +#include "base/process.h" +#include "chrome_frame/crash_server_init.h" +#include "chrome_frame/test/chrome_frame_test_utils.h" #include "gtest/gtest.h" class ObligatoryModule: public CAtlExeModuleT<ObligatoryModule> { @@ -26,9 +29,18 @@ int main(int argc, char** argv) { base::AtExitManager at_exit_manager; g_at_exit_manager = &at_exit_manager; + + base::ProcessHandle crash_service = chrome_frame_test::StartCrashService(); + + google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( + InitializeCrashReporting(HEADLESS)); + CommandLine::Init(argc, argv); RUN_ALL_TESTS(); g_at_exit_manager = NULL; + + if (crash_service) + base::KillProcess(crash_service, 0, false); } |