summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 12:18:20 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 12:18:20 +0000
commit40bbe59d2dd822e8448047f25c0349bb5c44d938 (patch)
tree618f1bf2b7c464f70e908248fbbe799133f3a1c0 /chrome_frame
parente2fefe23d79a1de960d8903d9bb8520e6d1e1bd6 (diff)
downloadchromium_src-40bbe59d2dd822e8448047f25c0349bb5c44d938.zip
chromium_src-40bbe59d2dd822e8448047f25c0349bb5c44d938.tar.gz
chromium_src-40bbe59d2dd822e8448047f25c0349bb5c44d938.tar.bz2
GTTF: Detect browser crashes on shutdown in UI tests.
Previously the automation framework could miss a browser crash during shutdown on POSIX (on Windows there is crash_service.exe that should catch all crashes). This change makes the automation framework avoid losing information about the browser process' exit status (CrashAwareSleep), and fixes a bug in base::WaitForExitCodeWithTimeout (which on POSIX never reported the process has been signaled). Finally, it makes the automation framework use WaitForExitCodeWithTimeout instead of WaitForSingleProcess. This way we can get the exit status information in an accurate and cross-platform way. To avoid trying to close the same process handle twice (it's only an issue on Windows) I've changed WaitForExitCodeWithTimeout not to close the passed handle. It's only used in few places and I think this CL fixes all of them. I've tested this change locally on Mac with a UI test that SIGKILLs the browser. Before this change the test passed (it shouldn't), and after this change the test failed with an information that the browser has not exited cleanly. BUG=56644 Review URL: http://codereview.chromium.org/6689014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80608 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/perf/chrome_frame_perftest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc
index 4320bff..dac9605 100644
--- a/chrome_frame/test/perf/chrome_frame_perftest.cc
+++ b/chrome_frame/test/perf/chrome_frame_perftest.cc
@@ -1358,7 +1358,8 @@ void PrintResultList(const std::string& measurement,
bool RunSingleTestOutOfProc(const std::string& test_name) {
FilePath path;
- PathService::Get(base::DIR_EXE, &path);
+ if (!PathService::Get(base::DIR_EXE, &path))
+ return false;
path = path.Append(L"chrome_frame_tests.exe");
CommandLine cmd_line(path);
@@ -1384,6 +1385,8 @@ bool RunSingleTestOutOfProc(const std::string& test_name) {
base::KillProcess(process_handle, -1, true);
}
+ base::CloseProcessHandle(process_handle);
+
return exit_code == 0;
}