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

Unified Diff: chrome/browser/errorpage_uitest.cc

Issue 6546069: Only display Link Doctor page on 404 errors with no body (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Response to comments Created 9 years, 10 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
« no previous file with comments | « no previous file | chrome/renderer/navigation_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/errorpage_uitest.cc
===================================================================
--- chrome/browser/errorpage_uitest.cc (revision 75637)
+++ chrome/browser/errorpage_uitest.cc (working copy)
@@ -165,48 +165,11 @@
EXPECT_TRUE(WaitForTitleMatching(L"Blah"));
}
-#if defined(OS_WIN)
-// Might be related to http://crbug.com/60937
-#define MAYBE_IFrame404 FLAKY_IFrame404
-#else
-#define MAYBE_IFrame404 IFrame404
-#endif
-
-TEST_F(ErrorPageTest, MAYBE_IFrame404) {
- // iframes that have 404 pages should not trigger an alternate error page.
- // In this test, the iframe sets the title of the parent page to "SUCCESS"
- // when the iframe loads. If the iframe fails to load (because an alternate
- // error page loads instead), then the title will remain as "FAIL".
- net::TestServer test_server(net::TestServer::TYPE_HTTP,
- FilePath(FILE_PATH_LITERAL("chrome/test/data")));
- ASSERT_TRUE(test_server.Start());
- NavigateToURL(test_server.GetURL("files/iframe404.html"));
- EXPECT_TRUE(WaitForTitleMatching(L"SUCCESS"));
-}
-
+// Checks that the Link Doctor is not loaded when we receive an actual 404 page.
TEST_F(ErrorPageTest, Page404) {
- NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(
- FilePath(FILE_PATH_LITERAL("title2.html"))));
- // The first navigation should fail, and the second one should be the error
- // page.
NavigateToURLBlockUntilNavigationsComplete(
Paweł Hajdan Jr. 2011/02/25 16:02:12 nit: If you're waiting for just one navigation, pl
URLRequestMockHTTPJob::GetMockUrl(
- FilePath(FILE_PATH_LITERAL("page404.html"))), 2);
+ FilePath(FILE_PATH_LITERAL("page404.html"))), 1);
- EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor"));
+ EXPECT_TRUE(WaitForTitleMatching(L"SUCCESS"));
}
-
-TEST_F(ErrorPageTest, Page404_GoBack) {
- NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(
- FilePath(FILE_PATH_LITERAL("title2.html"))));
- // The first navigation should fail, and the second one should be the error
- // page.
- NavigateToURLBlockUntilNavigationsComplete(
- URLRequestMockHTTPJob::GetMockUrl(
- FilePath(FILE_PATH_LITERAL("page404.html"))), 2);
- EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor"));
-
- EXPECT_TRUE(GetActiveTab()->GoBack());
-
- EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness"));
-}
« no previous file with comments | « no previous file | chrome/renderer/navigation_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698