summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-11 00:32:09 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-11 00:32:09 +0000
commit036d83894fc084e0d05cc98fcf992505800f0c8c (patch)
tree36e2396d80b8850d443fe4cab5695a74cd7eef09 /chrome_frame
parent48fbd3e7631e313aab0836f8992bf63e88c67b69 (diff)
downloadchromium_src-036d83894fc084e0d05cc98fcf992505800f0c8c.zip
chromium_src-036d83894fc084e0d05cc98fcf992505800f0c8c.tar.gz
chromium_src-036d83894fc084e0d05cc98fcf992505800f0c8c.tar.bz2
Revert 70962 - Prevent extract build failures on the ChromeFrame builders caused when the chrome frame
tests executable crashes while running a test by register an exception handler and terminating the relevant processes. Win Builder (dbg)(shared) : compile failed BUG=none TEST=none Review URL: http://codereview.chromium.org/6136004 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/6115005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/run_all_unittests.cc53
1 files changed, 21 insertions, 32 deletions
diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc
index e40a5eb..694c6c0 100644
--- a/chrome_frame/test/run_all_unittests.cc
+++ b/chrome_frame/test/run_all_unittests.cc
@@ -31,7 +31,6 @@ void PureCall() {
__debugbreak();
}
-#pragma warning(disable:4509)
int main(int argc, char **argv) {
base::EnableTerminationOnHeapCorruption();
base::PlatformThread::SetName("ChromeFrame tests");
@@ -45,36 +44,27 @@ int main(int argc, char **argv) {
base::ProcessHandle crash_service = chrome_frame_test::StartCrashService();
int ret = -1;
-
- __try {
- // If mini_installer is used to register CF, we use the switch
- // --no-registration to avoid repetitive registration.
- if (CommandLine::ForCurrentProcess()->HasSwitch(kNoRegistrationSwitch)) {
- ret = test_suite.Run();
- } else {
- // Register paths needed by the ScopedChromeFrameRegistrar.
- chrome::RegisterPathProvider();
-
- // This will register the chrome frame in the build directory. It
- // currently leaves that chrome frame registered once the tests are done.
- // It must be constructed AFTER the TestSuite is created since TestSuites
- // create THE AtExitManager.
- // TODO(robertshield): Make these tests restore the original registration
- // once done.
- ScopedChromeFrameRegistrar registrar;
-
- // Register IAccessible2 proxy stub DLL, needed for some tests.
- ScopedChromeFrameRegistrar ia2_registrar(
- chrome_frame_test::GetIAccessible2ProxyStubPath().value());
-
- ret = test_suite.Run();
- }
- }
-
- _except(EXCEPTION_EXECUTE_HANDLER) {
- LOG(ERROR) << "ChromeFrame tests crashed";
- chrome_frame_test::KillProcesses(L"iexplore.exe", 0, false);
- chrome_frame_test::KillProcesses(L"firefox.exe", 0, false);
+ // If mini_installer is used to register CF, we use the switch
+ // --no-registration to avoid repetitive registration.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(kNoRegistrationSwitch)) {
+ ret = test_suite.Run();
+ } else {
+ // Register paths needed by the ScopedChromeFrameRegistrar.
+ chrome::RegisterPathProvider();
+
+ // This will register the chrome frame in the build directory. It currently
+ // leaves that chrome frame registered once the tests are done. It must be
+ // constructed AFTER the TestSuite is created since TestSuites create THE
+ // AtExitManager.
+ // TODO(robertshield): Make these tests restore the original registration
+ // once done.
+ ScopedChromeFrameRegistrar registrar;
+
+ // Register IAccessible2 proxy stub DLL, needed for some tests.
+ ScopedChromeFrameRegistrar ia2_registrar(
+ chrome_frame_test::GetIAccessible2ProxyStubPath().value());
+
+ ret = test_suite.Run();
}
DeleteConfigValue(kChromeFrameHeadlessMode);
@@ -83,4 +73,3 @@ int main(int argc, char **argv) {
if (crash_service)
base::KillProcess(crash_service, 0, false);
}
-#pragma warning(default:4509)