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

Unified Diff: chrome/browser/process_singleton_win_unittest.cc

Issue 2271833002: Continue browser startup after killing a hung browser instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 years, 4 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_win_unittest.cc
diff --git a/chrome/browser/process_singleton_win_unittest.cc b/chrome/browser/process_singleton_win_unittest.cc
index 7bd6f79fcc3d075cf46c12054534fe511d81453e..2aed9fc6123dfa1abfa8e19e0865ac73efc0c8a5 100644
--- a/chrome/browser/process_singleton_win_unittest.cc
+++ b/chrome/browser/process_singleton_win_unittest.cc
@@ -264,13 +264,16 @@ TEST_F(ProcessSingletonTest, KillsHungBrowserWithNoWindows) {
// user interaction.
ProcessSingleton::NotifyResult notify_result =
test_singleton()->NotifyOtherProcessOrCreate();
- ASSERT_EQ(ProcessSingleton::PROFILE_IN_USE, notify_result);
+
+ // The hung process was killed and the notification is equivalent to
+ // a non existent process.
+ ASSERT_EQ(ProcessSingleton::PROCESS_NONE, notify_result);
// The should-kill callback should not have been called, as the "browser" does
// not have visible window.
EXPECT_FALSE(should_kill_called());
- // Verify that the hung browser has beem terminated with the
+ // Verify that the hung browser has been terminated with the
// RESULT_CODE_HUNG exit code.
int exit_code = 0;
EXPECT_TRUE(
@@ -304,13 +307,16 @@ TEST_F(ProcessSingletonTest, KillWithUserPermission) {
// before killing the hung process.
ProcessSingleton::NotifyResult notify_result =
test_singleton()->NotifyOtherProcessOrCreate();
- ASSERT_EQ(ProcessSingleton::PROFILE_IN_USE, notify_result);
+
+ // The hung process was killed and the notification is equivalent to
+ // a non existent process.
+ ASSERT_EQ(ProcessSingleton::PROCESS_NONE, notify_result);
// The should-kill callback should have been called, as the "browser" has a
// visible window.
EXPECT_TRUE(should_kill_called());
- // Verify that the hung browser has beem terminated with the
+ // Verify that the hung browser has been terminated with the
// RESULT_CODE_HUNG exit code.
int exit_code = 0;
EXPECT_TRUE(
« chrome/browser/process_singleton_win.cc ('K') | « chrome/browser/process_singleton_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698