summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-27 17:08:24 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-27 17:08:24 +0000
commit2e1101f030285d73640c7205a21d1da243517a3d (patch)
tree214eaf791cf202c3a5071e17b66493f395735911 /chrome_frame
parent17e5241835f20fb8412acf1762b5ce84f7a68353 (diff)
downloadchromium_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')
-rw-r--r--chrome_frame/chrome_frame.gyp2
-rw-r--r--chrome_frame/chrome_frame_unittest_main.cc12
2 files changed, 14 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp
index ab5a3c5..8684b05 100644
--- a/chrome_frame/chrome_frame.gyp
+++ b/chrome_frame/chrome_frame.gyp
@@ -121,6 +121,7 @@
'vtable_patch_manager_unittest.cc',
],
'include_dirs': [
+ '<(DEPTH)/breakpad/src',
],
'resource_include_dirs': [
'<(INTERMEDIATE_DIR)',
@@ -141,6 +142,7 @@
'conditions': [
['OS=="win"', {
'dependencies': [
+ '../breakpad/breakpad.gyp:breakpad_handler',
# TODO(slightlyoff): Get automation targets working on OS X
'../chrome/chrome.gyp:automation',
],
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);
}