summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 23:07:07 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 23:07:07 +0000
commit72d3a3106eaefc97d92214e77b8eb3d65fe45110 (patch)
tree45b4d383c216928fb9decfca8382310973fb3b45 /chrome_frame
parent77bc58b9b1de33f199025c0c3ec55633c88d879e (diff)
downloadchromium_src-72d3a3106eaefc97d92214e77b8eb3d65fe45110.zip
chromium_src-72d3a3106eaefc97d92214e77b8eb3d65fe45110.tar.gz
chromium_src-72d3a3106eaefc97d92214e77b8eb3d65fe45110.tar.bz2
Ensure that crashes are properly reported during chrome frame net test runs. Start the crash
service if not already running when starting chrome frame net tests and terminate it when done. BUG=86846 TEST=Crash dumps are reported when running Chrome Frame net tests in headless mode. Review URL: http://codereview.chromium.org/7235009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index 2344296..c29742d 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -40,6 +40,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/renderer/chrome_content_renderer_client.h"
+#include "chrome_frame/crash_server_init.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test/net/test_automation_resource_message_filter.h"
#include "chrome_frame/test/simulate_input.h"
@@ -551,6 +552,11 @@ int main(int argc, char** argv) {
return 0;
}
+ base::ProcessHandle crash_service = chrome_frame_test::StartCrashService();
+
+ google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad(
+ InitializeCrashReporting(HEADLESS));
+
// TODO(tommi): Stuff be broke. Needs a fixin'.
// This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains
// the instance of the AtExitManager that RegisterPathProvider() and others
@@ -564,5 +570,11 @@ int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
FilterDisabledTests();
test_suite.RunMainUIThread();
+
+ if (crash_service)
+ base::KillProcess(crash_service, 0, false);
+
+ base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL);
+ base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL);
return test_suite.test_result();
}