Chromium Code Reviews| Index: chrome/browser/ui/login/login_handler_browsertest.cc |
| diff --git a/chrome/browser/ui/login/login_handler_browsertest.cc b/chrome/browser/ui/login/login_handler_browsertest.cc |
| index b98ab6428ce6c115b9ab44c51d67bb8978781bc3..1b92cda6d775767b043b19d6aab5005bca1978a4 100644 |
| --- a/chrome/browser/ui/login/login_handler_browsertest.cc |
| +++ b/chrome/browser/ui/login/login_handler_browsertest.cc |
| @@ -103,6 +103,12 @@ const char kSingleRealmTestPage[] = "/login/single_realm.html"; |
| const char kAuthBasicPage[] = "/auth-basic"; |
| const char kAuthDigestPage[] = "/auth-digest"; |
| +// It does not matter what pages are selected as no-auth, as long as they exist. |
| +// Navigating to non-existing pages caused flakes in the past |
| +// (http://crbug.com/636875). |
|
meacer
2016/08/12 17:23:27
Very tiny nit: https://crbug.com :)
vabr (Chromium)
2016/08/12 19:40:08
Done.
|
| +const char kNoAuthPage1[] = "/simple.html"; |
| +const char kNoAuthPage2[] = "/form.html"; |
| + |
| base::string16 ExpectedTitleFromAuth(const base::string16& username, |
| const base::string16& password) { |
| // The TestServer sets the title to username/password on successful login. |
| @@ -348,7 +354,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth_Manual) { |
| IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth_OnNavigation) { |
| ASSERT_TRUE(embedded_test_server()->Start()); |
| const GURL auth_page = embedded_test_server()->GetURL(kAuthBasicPage); |
| - const GURL no_auth_page = embedded_test_server()->GetURL("/b"); |
| + const GURL no_auth_page = embedded_test_server()->GetURL(kNoAuthPage1); |
| NavigationController* controller = |
| &browser()->tab_strip_model()->GetActiveWebContents()->GetController(); |
| @@ -378,7 +384,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth_OnNavigation) { |
| IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth_OnBack) { |
| ASSERT_TRUE(embedded_test_server()->Start()); |
| const GURL auth_page = embedded_test_server()->GetURL(kAuthBasicPage); |
| - const GURL no_auth_page = embedded_test_server()->GetURL("/a"); |
| + const GURL no_auth_page = embedded_test_server()->GetURL(kNoAuthPage1); |
| NavigationController* controller = |
| &browser()->tab_strip_model()->GetActiveWebContents()->GetController(); |
| @@ -409,13 +415,11 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth_OnBack) { |
| } |
| // Test login prompt cancellation on navigation to forward. |
| -// TODO(crbug.com/636875) Flaky on Mac and Linux at least. |
| -IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, |
| - DISABLED_TestCancelAuth_OnForward) { |
| +IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth_OnForward) { |
| ASSERT_TRUE(embedded_test_server()->Start()); |
| const GURL auth_page = embedded_test_server()->GetURL(kAuthBasicPage); |
| - const GURL no_auth_page_1 = embedded_test_server()->GetURL("/a"); |
| - const GURL no_auth_page_2 = embedded_test_server()->GetURL("/c"); |
| + const GURL no_auth_page_1 = embedded_test_server()->GetURL(kNoAuthPage1); |
| + const GURL no_auth_page_2 = embedded_test_server()->GetURL(kNoAuthPage2); |
| NavigationController* controller = |
| &browser()->tab_strip_model()->GetActiveWebContents()->GetController(); |