diff options
author | creis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 19:21:44 +0000 |
---|---|---|
committer | creis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 19:21:44 +0000 |
commit | ea889ae0f3e6fb9902b5be7c5dd9ff8fa0e522e9 (patch) | |
tree | 9e90ada421df05e1dcf74711c814115e982b7c0b /webkit/tools | |
parent | 3afba4d1deabab42ef388cae40d6383a4b981a67 (diff) | |
download | chromium_src-ea889ae0f3e6fb9902b5be7c5dd9ff8fa0e522e9.zip chromium_src-ea889ae0f3e6fb9902b5be7c5dd9ff8fa0e522e9.tar.gz chromium_src-ea889ae0f3e6fb9902b5be7c5dd9ff8fa0e522e9.tar.bz2 |
Fix test_shell to use the correct page ID for error pages.
BUG=70315
TEST=Go back to a "confirm form resubmission" error, then forward.
Review URL: http://codereview.chromium.org/6286100
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index b877753..98bf6ef 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -892,6 +892,10 @@ void TestWebViewDelegate::didFailProvisionalLoad( static_cast<TestShellExtraData*>(failed_ds->extraData()); bool replace = extra_data && extra_data->pending_page_id != -1; + // Ensure the error page ends up with the same page ID if we are replacing. + if (replace) + set_pending_extra_data(new TestShellExtraData(extra_data->pending_page_id)); + const std::string& error_text = base::StringPrintf("Error %d when loading url %s", error.reason, failed_ds->request().url().spec().data()); @@ -901,6 +905,10 @@ void TestWebViewDelegate::didFailProvisionalLoad( frame->loadHTMLString( error_text, GURL("testshell-error:"), error.unreachableURL, replace); + + // In case the load failed before DidCreateDataSource was called. + if (replace) + set_pending_extra_data(NULL); } void TestWebViewDelegate::didCommitProvisionalLoad( |