Index: chrome/browser/ui/login/login_prompt_browsertest.cc |
diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc |
index de9be6f44ab2725d098d5754fd6ee88bceaf1c0c..476b3f55a6ac23f47052fc4fbcb5709d55b00c0f 100644 |
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc |
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc |
@@ -276,7 +276,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmConfirmation) { |
// Testing for recovery from an incorrect password for the case where |
// there are multiple authenticated resources. |
-// Marked as flaky. See crbug.com/68860 |
+// Marked as flaky. See http://crbug.com/69266 and http://crbug.com/68860 |
+// TODO(asanka): Remove logging when timeout issues are resolved. |
IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, FLAKY_IncorrectConfirmation) { |
ASSERT_TRUE(test_server()->Start()); |
GURL test_page = test_server()->GetURL(kSingleRealmTestPage); |
@@ -292,9 +293,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, FLAKY_IncorrectConfirmation) { |
WindowedLoadStopObserver load_stop_waiter(controller); |
+ LOG(INFO) << |
+ "Begin test run " |
+ "(tracing for potential hang. crbug.com/69266)"; |
{ |
WindowedAuthNeededObserver auth_needed_waiter(controller); |
browser()->OpenURL(test_page, GURL(), CURRENT_TAB, PageTransition::TYPED); |
+ LOG(INFO) << "Waiting for initial AUTH_NEEDED"; |
auth_needed_waiter.Wait(); |
} |
@@ -307,11 +312,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, FLAKY_IncorrectConfirmation) { |
ASSERT_TRUE(handler); |
handler->SetAuth(bad_username_, bad_password_); |
+ LOG(INFO) << "Waiting for initial AUTH_SUPPLIED"; |
auth_supplied_waiter.Wait(); |
// The request should be retried after the incorrect password is |
// supplied. This should result in a new AUTH_NEEDED notification |
// for the same realm. |
+ LOG(INFO) << "Waiting for secondary AUTH_NEEDED"; |
auth_needed_waiter.Wait(); |
} |
@@ -327,21 +334,25 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, FLAKY_IncorrectConfirmation) { |
ASSERT_TRUE(handler); |
n_handlers++; |
SetAuthFor(handler); |
+ LOG(INFO) << "Waiting for secondary AUTH_SUPPLIED"; |
auth_supplied_waiter.Wait(); |
} |
- if (n_handlers < 1) |
+ if (n_handlers < 1) { |
+ LOG(INFO) << "Waiting for additional AUTH_NEEDED"; |
auth_needed_waiter.Wait(); |
+ } |
} |
- load_stop_waiter.Wait(); |
- |
// The single realm test has only one realm, and thus only one login |
// prompt. |
EXPECT_EQ(1, n_handlers); |
EXPECT_LT(0, observer.auth_needed_count_); |
- EXPECT_LT(0, observer.auth_supplied_count_); |
EXPECT_EQ(0, observer.auth_cancelled_count_); |
+ EXPECT_EQ(observer.auth_needed_count_, observer.auth_supplied_count_); |
+ LOG(INFO) << "Waiting for LOAD_STOP"; |
+ load_stop_waiter.Wait(); |
EXPECT_TRUE(test_server()->Stop()); |
+ LOG(INFO) << "Done with test"; |
} |
-} // namespace |
+} // namespace |