From 15d79e12a0831ac527dc938297c14a386dcf5f0a Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Sun, 2 Aug 2009 19:23:45 +0000 Subject: Move alternate error page loading out of WebFrame. Make the RenderView be in charge of loading alternate error pages. While working on this change, I noticed several related bugs: 1- Loading an URL with an invalid host name from the new tab page results in an error page. If you hit back and then forward, you will be left with an empty location bar. In a debug build this trips an assertion in ClassifyNavigation because the given page_id is -1. This problem is caused by not duplicating the NavigationState of the failed load when creating a load for the error page. Hence, the pending_page_id of the forward navigation is lost. 2- Loading an URL with an invalid host name as a subframe results in an extra navigation in session history. One navigation for the main frame and one navigation for the error page load. This is another symptom of the problem described in #1. However, the solution is different. Here, we need to know that the subframe load is an AUTO_SUBFRAME load so that we load the error page using 'replace' semantics (so that WebCore does not generate a new session history entry). Finally, I decided to restrict alternative DNS error pages to only work for the main frame to match what we do for alternative 404 error pages. It doesn't seem worth it to show link doctor results for subframes since their primary purpose is to assist people who mis-type an URL. R=tony,brettw BUG=15648 TEST=covered by errorpage_uitest.cc Review URL: http://codereview.chromium.org/159575 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22253 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/data/iframe_dns_error.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 chrome/test/data/iframe_dns_error.html (limited to 'chrome/test/data/iframe_dns_error.html') diff --git a/chrome/test/data/iframe_dns_error.html b/chrome/test/data/iframe_dns_error.html new file mode 100644 index 0000000..8a68349 --- /dev/null +++ b/chrome/test/data/iframe_dns_error.html @@ -0,0 +1,9 @@ + + +Blah + + +This frame will fail to load with a DNS error: + + + -- cgit v1.1