summaryrefslogtreecommitdiffstats
path: root/chrome
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
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')
-rw-r--r--chrome/browser/errorpage_uitest.cc17
-rw-r--r--chrome/test/data/page404.html1
-rw-r--r--chrome/test/data/page404.html.mock-http-headers2
3 files changed, 20 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"));
+}
diff --git a/chrome/test/data/page404.html b/chrome/test/data/page404.html
new file mode 100644
index 0000000..9fcac4a
--- /dev/null
+++ b/chrome/test/data/page404.html
@@ -0,0 +1 @@
+<title>FAILURE</title>
diff --git a/chrome/test/data/page404.html.mock-http-headers b/chrome/test/data/page404.html.mock-http-headers
new file mode 100644
index 0000000..0590363
--- /dev/null
+++ b/chrome/test/data/page404.html.mock-http-headers
@@ -0,0 +1,2 @@
+HTTP/1.0 404 Not Found
+Content-type: text/html