Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3747)

Unified Diff: chrome/browser/process_singleton_linux_uitest.cc

Issue 6689014: GTTF: Detect browser crashes on shutdown in UI tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/process_singleton_linux_uitest.cc
===================================================================
--- chrome/browser/process_singleton_linux_uitest.cc (revision 80488)
+++ chrome/browser/process_singleton_linux_uitest.cc (working copy)
@@ -171,7 +171,10 @@
NotifyOtherProcess(url, TestTimeouts::action_timeout_ms()));
// Wait for a while to make sure the browser process is actually killed.
- EXPECT_FALSE(CrashAwareSleep(TestTimeouts::action_timeout_ms()));
+ int exit_code = 0;
+ ASSERT_TRUE(launcher_->WaitForBrowserProcessToQuit(
+ TestTimeouts::action_max_timeout_ms(), &exit_code));
+ EXPECT_EQ(-1, exit_code); // Expect unclean shutdown.
}
// Test that we don't kill ourselves by accident if a lockfile with the same pid
@@ -225,7 +228,10 @@
// Kill the browser process, so that it does not respond on the socket.
kill(pid, SIGKILL);
// Wait for a while to make sure the browser process is actually killed.
- EXPECT_FALSE(CrashAwareSleep(TestTimeouts::action_timeout_ms()));
+ int exit_code = 0;
+ ASSERT_TRUE(launcher_->WaitForBrowserProcessToQuit(
+ TestTimeouts::action_max_timeout_ms(), &exit_code));
+ EXPECT_EQ(-1, exit_code); // Expect unclean shutdown.
EXPECT_EQ(0, unlink(lock_path_.value().c_str()));
EXPECT_EQ(0, symlink("FAKEFOOHOST-1234", lock_path_.value().c_str()));
@@ -247,7 +253,10 @@
// Kill the browser process, so that it does not respond on the socket.
kill(pid, SIGKILL);
// Wait for a while to make sure the browser process is actually killed.
- EXPECT_FALSE(CrashAwareSleep(TestTimeouts::action_timeout_ms()));
+ int exit_code = 0;
+ ASSERT_TRUE(launcher_->WaitForBrowserProcessToQuit(
+ TestTimeouts::action_max_timeout_ms(), &exit_code));
+ EXPECT_EQ(-1, exit_code); // Expect unclean shutdown.
EXPECT_EQ(0, unlink(lock_path_.value().c_str()));
EXPECT_EQ(0, symlink("FAKEFOOHOST-1234", lock_path_.value().c_str()));

Powered by Google App Engine
This is Rietveld 408576698