Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: content/test/test_render_frame_host.cc

Issue 1678303004: PlzNavigate: inform the renderer that a navigation is a POST (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/test_render_frame_host.h" 5 #include "content/test/test_render_frame_host.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "content/browser/frame_host/frame_tree.h" 8 #include "content/browser/frame_host/frame_tree.h"
9 #include "content/browser/frame_host/navigation_handle_impl.h" 9 #include "content/browser/frame_host/navigation_handle_impl.h"
10 #include "content/browser/frame_host/navigation_request.h" 10 #include "content/browser/frame_host/navigation_request.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest( 341 void TestRenderFrameHost::SendRendererInitiatedNavigationRequest(
342 const GURL& url, 342 const GURL& url,
343 bool has_user_gesture) { 343 bool has_user_gesture) {
344 // Since this is renderer-initiated navigation, the RenderFrame must be 344 // Since this is renderer-initiated navigation, the RenderFrame must be
345 // initialized. Do it if it hasn't happened yet. 345 // initialized. Do it if it hasn't happened yet.
346 InitializeRenderFrameIfNeeded(); 346 InitializeRenderFrameIfNeeded();
347 347
348 if (IsBrowserSideNavigationEnabled()) { 348 if (IsBrowserSideNavigationEnabled()) {
349 BeginNavigationParams begin_params("GET", std::string(), net::LOAD_NORMAL, 349 BeginNavigationParams begin_params(std::string(), net::LOAD_NORMAL,
350 has_user_gesture, false, 350 has_user_gesture, false,
351 REQUEST_CONTEXT_TYPE_HYPERLINK); 351 REQUEST_CONTEXT_TYPE_HYPERLINK);
352 CommonNavigationParams common_params; 352 CommonNavigationParams common_params;
353 common_params.url = url; 353 common_params.url = url;
354 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); 354 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault);
355 common_params.transition = ui::PAGE_TRANSITION_LINK; 355 common_params.transition = ui::PAGE_TRANSITION_LINK;
356 OnBeginNavigation(common_params, begin_params, 356 OnBeginNavigation(common_params, begin_params,
357 scoped_refptr<ResourceRequestBody>()); 357 scoped_refptr<ResourceRequestBody>());
358 } 358 }
359 } 359 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // cleared during DidFailProvisionalLoad). 416 // cleared during DidFailProvisionalLoad).
417 int page_id = entry ? entry->GetPageID() : -1; 417 int page_id = entry ? entry->GetPageID() : -1;
418 if (page_id == -1) { 418 if (page_id == -1) {
419 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); 419 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate());
420 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; 420 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1;
421 } 421 }
422 return page_id; 422 return page_id;
423 } 423 }
424 424
425 } // namespace content 425 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698