summaryrefslogtreecommitdiffstats
path: root/chrome/browser/errorpage_uitest.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 19:31:33 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 19:31:33 +0000
commit6aa881bebd77b8884229496d3d5592431dcd6227 (patch)
tree5bb66688c86e8f4978dd63b1ce93983e51911dc8 /chrome/browser/errorpage_uitest.cc
parentbed947625415eb87879a48202a84b8b4bd2f92f1 (diff)
downloadchromium_src-6aa881bebd77b8884229496d3d5592431dcd6227.zip
chromium_src-6aa881bebd77b8884229496d3d5592431dcd6227.tar.gz
chromium_src-6aa881bebd77b8884229496d3d5592431dcd6227.tar.bz2
When loading an alternate 404 error page, always set 'replace' to true.
This is necessary because WebCore still loads an empty blank page when we postpone the data for the original 404 error page. R=tony BUG=18109 TEST=errorpage_uitest.cc Review URL: http://codereview.chromium.org/159801 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/errorpage_uitest.cc')
-rw-r--r--chrome/browser/errorpage_uitest.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/errorpage_uitest.cc b/chrome/browser/errorpage_uitest.cc
index b72308c..4fa2125 100644
--- a/chrome/browser/errorpage_uitest.cc
+++ b/chrome/browser/errorpage_uitest.cc
@@ -152,3 +152,20 @@ TEST_F(ErrorPageTest, IFrame404) {
EXPECT_TRUE(WaitForTitleMatching(L"SUCCESS"));
}
+
+TEST_F(ErrorPageTest, Page404) {
+ NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"title2.html"));
+ NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"page404.html"));
+
+ EXPECT_TRUE(WaitForTitleContaining("page404.html"));
+}
+
+TEST_F(ErrorPageTest, Page404_GoBack) {
+ NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"title2.html"));
+ NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"page404.html"));
+ EXPECT_TRUE(WaitForTitleContaining("page404.html"));
+
+ GetActiveTab()->GoBack();
+
+ EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness"));
+}