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

Unified Diff: chrome/browser/ui/login/login_prompt_uitest.cc

Issue 8316022: Move LoginPromptTest.TestCancelAuth to a browsertest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: notification_service moved to content Created 9 years, 2 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/ui/login/login_prompt_uitest.cc
diff --git a/chrome/browser/ui/login/login_prompt_uitest.cc b/chrome/browser/ui/login/login_prompt_uitest.cc
index e03a6b3dd55a76df35fb8a8942ff70e06ff1da07..9a375b39af7c97b50aa924588e56beda32f8495f 100644
--- a/chrome/browser/ui/login/login_prompt_uitest.cc
+++ b/chrome/browser/ui/login/login_prompt_uitest.cc
@@ -126,52 +126,6 @@ TEST_F(LoginPromptTest, TestTwoAuths) {
EXPECT_EQ(ExpectedTitleFromAuth(username_digest_, password_), title);
}
-// Test that cancelling authentication works.
-// Flaky, http://crbug.com/90198.
-TEST_F(LoginPromptTest, FLAKY_TestCancelAuth) {
- ASSERT_TRUE(test_server_.Start());
-
- scoped_refptr<TabProxy> tab(GetActiveTab());
- ASSERT_TRUE(tab.get());
-
- // First navigate to a test server page so we have something to go back to.
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(test_server_.GetURL("a")));
-
- // Navigating while auth is requested is the same as cancelling.
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED,
- tab->NavigateToURL(test_server_.GetURL("auth-basic")));
- EXPECT_TRUE(tab->NeedsAuth());
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(test_server_.GetURL("b")));
- EXPECT_FALSE(tab->NeedsAuth());
-
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED,
- tab->NavigateToURL(test_server_.GetURL("auth-basic")));
- EXPECT_TRUE(tab->NeedsAuth());
- EXPECT_TRUE(tab->GoBack()); // should bring us back to 'a'
- EXPECT_FALSE(tab->NeedsAuth());
-
- // Now add a page and go back, so we have something to go forward to.
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(test_server_.GetURL("c")));
- EXPECT_TRUE(tab->GoBack()); // should bring us back to 'a'
-
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED,
- tab->NavigateToURL(test_server_.GetURL("auth-basic")));
- EXPECT_TRUE(tab->NeedsAuth());
- EXPECT_TRUE(tab->GoForward()); // should bring us to 'c'
- EXPECT_FALSE(tab->NeedsAuth());
-
- // Now test that cancelling works as expected.
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED,
- tab->NavigateToURL(test_server_.GetURL("auth-basic")));
- EXPECT_TRUE(tab->NeedsAuth());
- EXPECT_TRUE(tab->CancelAuth());
- EXPECT_FALSE(tab->NeedsAuth());
- EXPECT_EQ(L"Denied: no auth", GetActiveTabTitle());
-}
-
// If multiple tabs are looking for the same auth, the user should only have to
// enter it once.
TEST_F(LoginPromptTest, SupplyRedundantAuths) {

Powered by Google App Engine
This is Rietveld 408576698