| Index: content/browser/frame_host/navigation_handle_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
|
| index fed466be31c84c3ed8975cb196e6a8caaf1b6787..4a612b389118ee98114346bd721fd33176047b16 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -305,10 +305,11 @@ NavigationHandleImpl::CallWillRedirectRequestForTesting(
|
|
|
| NavigationThrottle::ThrottleCheckResult
|
| NavigationHandleImpl::CallWillProcessResponseForTesting(
|
| - content::RenderFrameHost* render_frame_host) {
|
| + content::RenderFrameHost* render_frame_host,
|
| + scoped_refptr<net::HttpResponseHeaders> response_headers) {
|
| NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER;
|
| WillProcessResponse(static_cast<RenderFrameHostImpl*>(render_frame_host),
|
| - scoped_refptr<net::HttpResponseHeaders>(), SSLStatus(),
|
| + response_headers, SSLStatus(),
|
| base::Bind(&UpdateThrottleCheckResult, &result));
|
|
|
| // Reset the callback to ensure it will not be called later.
|
| @@ -316,6 +317,33 @@ NavigationHandleImpl::CallWillProcessResponseForTesting(
|
| return result;
|
| }
|
|
|
| +void NavigationHandleImpl::CallDidCommitNavigationForTesting(
|
| + const GURL& url,
|
| + ui::PageTransition transition,
|
| + bool same_page,
|
| + RenderFrameHost* render_frame_host) {
|
| + FrameHostMsg_DidCommitProvisionalLoad_Params params;
|
| +
|
| + params.page_id = 1;
|
| + params.nav_entry_id = 1;
|
| + params.url = url;
|
| + params.referrer = content::Referrer();
|
| + params.transition = transition;
|
| + params.redirects = std::vector<GURL>();
|
| + params.should_update_history = false;
|
| + params.searchable_form_url = GURL();
|
| + params.searchable_form_encoding = std::string();
|
| + params.did_create_new_entry = false;
|
| + params.gesture = NavigationGestureUser;
|
| + params.was_within_same_page = false;
|
| + params.method = "GET";
|
| + params.page_state = PageState::CreateFromURL(url);
|
| + params.contents_mime_type = std::string("text/html");
|
| +
|
| + DidCommitNavigation(params, same_page,
|
| + static_cast<RenderFrameHostImpl*>(render_frame_host));
|
| +}
|
| +
|
| NavigationData* NavigationHandleImpl::GetNavigationData() {
|
| return navigation_data_.get();
|
| }
|
|
|