diff options
author | avi <avi@chromium.org> | 2015-03-31 09:09:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-31 16:09:41 +0000 |
commit | 31b6fa4397bc79a5a4b3b9e3805176a28a05fdda (patch) | |
tree | abe45daee4362e887d20520bef755cce47839709 /content/renderer | |
parent | bd73117907c7f1d317f1b71a61e98dc686d0b0fc (diff) | |
download | chromium_src-31b6fa4397bc79a5a4b3b9e3805176a28a05fdda.zip chromium_src-31b6fa4397bc79a5a4b3b9e3805176a28a05fdda.tar.gz chromium_src-31b6fa4397bc79a5a4b3b9e3805176a28a05fdda.tar.bz2 |
Add the WebHistoryCommitType to didFailProvisionalLoad, part 3.
BUG=471292
TEST=none
Review URL: https://codereview.chromium.org/1044923003
Cr-Commit-Position: refs/heads/master@{#323049}
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/render_frame_impl.cc | 22 | ||||
-rw-r--r-- | content/renderer/render_frame_impl.h | 5 | ||||
-rw-r--r-- | content/renderer/render_view_browsertest.cc | 13 |
3 files changed, 15 insertions, 25 deletions
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index c215b08..57a29fc 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -2477,8 +2477,10 @@ void RenderFrameImpl::didReceiveServerRedirectForProvisionalLoad( render_view_->history_controller()->RemoveChildrenForRedirect(this); } -void RenderFrameImpl::didFailProvisionalLoad(blink::WebLocalFrame* frame, - const blink::WebURLError& error) { +void RenderFrameImpl::didFailProvisionalLoad( + blink::WebLocalFrame* frame, + const blink::WebURLError& error, + blink::WebHistoryCommitType commit_type) { TRACE_EVENT1("navigation", "RenderFrameImpl::didFailProvisionalLoad", "id", routing_id_); DCHECK(!frame_ || frame_ == frame); @@ -2574,13 +2576,6 @@ void RenderFrameImpl::didFailProvisionalLoad(blink::WebLocalFrame* frame, LoadNavigationErrorPage(failed_request, error, replace); } -void RenderFrameImpl::didFailProvisionalLoad( - blink::WebLocalFrame* frame, - const blink::WebURLError& error, - blink::WebHistoryCommitType commit_type) { - didFailProvisionalLoad(frame, error); -} - void RenderFrameImpl::didCommitProvisionalLoad( blink::WebLocalFrame* frame, const blink::WebHistoryItem& item, @@ -2821,7 +2816,8 @@ void RenderFrameImpl::didHandleOnloadEvents(blink::WebLocalFrame* frame) { } void RenderFrameImpl::didFailLoad(blink::WebLocalFrame* frame, - const blink::WebURLError& error) { + const blink::WebURLError& error, + blink::WebHistoryCommitType commit_type) { TRACE_EVENT1("navigation", "RenderFrameImpl::didFailLoad", "id", routing_id_); DCHECK(!frame_ || frame_ == frame); @@ -2847,12 +2843,6 @@ void RenderFrameImpl::didFailLoad(blink::WebLocalFrame* frame, error_description)); } -void RenderFrameImpl::didFailLoad(blink::WebLocalFrame* frame, - const blink::WebURLError& error, - blink::WebHistoryCommitType commit_type) { - didFailLoad(frame, error); -} - void RenderFrameImpl::didFinishLoad(blink::WebLocalFrame* frame) { TRACE_EVENT1("navigation", "RenderFrameImpl::didFinishLoad", "id", routing_id_); diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 8fce860..c1bd46b 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -403,9 +403,6 @@ class CONTENT_EXPORT RenderFrameImpl blink::WebLocalFrame* frame); virtual void didFailProvisionalLoad( blink::WebLocalFrame* frame, - const blink::WebURLError& error); - virtual void didFailProvisionalLoad( - blink::WebLocalFrame* frame, const blink::WebURLError& error, blink::WebHistoryCommitType commit_type); virtual void didCommitProvisionalLoad( @@ -423,8 +420,6 @@ class CONTENT_EXPORT RenderFrameImpl virtual void didFinishDocumentLoad(blink::WebLocalFrame* frame); virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame); virtual void didFailLoad(blink::WebLocalFrame* frame, - const blink::WebURLError& error); - virtual void didFailLoad(blink::WebLocalFrame* frame, const blink::WebURLError& error, blink::WebHistoryCommitType commit_type); virtual void didFinishLoad(blink::WebLocalFrame* frame); diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index e9ab0dc..e778fdc 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc @@ -48,6 +48,7 @@ #include "third_party/WebKit/public/platform/WebURLResponse.h" #include "third_party/WebKit/public/web/WebDataSource.h" #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" +#include "third_party/WebKit/public/web/WebHistoryCommitType.h" #include "third_party/WebKit/public/web/WebHistoryItem.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebPerformance.h" @@ -1613,7 +1614,8 @@ TEST_F(RenderViewImplTest, DISABLED_DidFailProvisionalLoadWithErrorForError) { RequestNavigationParams()); // An error occurred. - view()->GetMainRenderFrame()->didFailProvisionalLoad(web_frame, error); + view()->GetMainRenderFrame()->didFailProvisionalLoad( + web_frame, error, blink::WebStandardCommit); // Frame should exit view-source mode. EXPECT_FALSE(web_frame->isViewSourceModeEnabled()); } @@ -1635,7 +1637,8 @@ TEST_F(RenderViewImplTest, DidFailProvisionalLoadWithErrorForCancellation) { RequestNavigationParams()); // A cancellation occurred. - view()->GetMainRenderFrame()->didFailProvisionalLoad(web_frame, error); + view()->GetMainRenderFrame()->didFailProvisionalLoad( + web_frame, error, blink::WebStandardCommit); // Frame should stay in view-source mode. EXPECT_TRUE(web_frame->isViewSourceModeEnabled()); } @@ -2032,7 +2035,8 @@ TEST_F(SuppressErrorPageTest, MAYBE_Suppresses) { RequestNavigationParams()); // An error occurred. - view()->GetMainRenderFrame()->didFailProvisionalLoad(web_frame, error); + view()->GetMainRenderFrame()->didFailProvisionalLoad( + web_frame, error, blink::WebStandardCommit); const int kMaxOutputCharacters = 22; EXPECT_EQ("", base::UTF16ToASCII(web_frame->contentAsText(kMaxOutputCharacters))); @@ -2061,7 +2065,8 @@ TEST_F(SuppressErrorPageTest, MAYBE_DoesNotSuppress) { RequestNavigationParams()); // An error occurred. - view()->GetMainRenderFrame()->didFailProvisionalLoad(web_frame, error); + view()->GetMainRenderFrame()->didFailProvisionalLoad( + web_frame, error, blink::WebStandardCommit); // The error page itself is loaded asynchronously. FrameLoadWaiter(frame()).Wait(); const int kMaxOutputCharacters = 22; |