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

Unified Diff: content/test/test_render_frame_host.cc

Issue 872473003: PlzNavigate: Remove the RequestNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits + fix compilation error Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/test_navigation_url_loader_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_render_frame_host.cc
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index 3f72489bd254c2f5ca2255746cf38bf80a98d6e7..0d78f5d142fe0c1c9ea7fd314acc0a8529ade4af 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -10,6 +10,7 @@
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/navigator_impl.h"
#include "content/browser/frame_host/render_frame_host_delegate.h"
+#include "content/common/frame_messages.h"
#include "content/public/browser/stream_handle.h"
#include "content/public/common/content_switches.h"
#include "content/test/browser_side_navigation_test_utils.h"
@@ -187,15 +188,14 @@ void TestRenderFrameHost::SendNavigateWithParameters(
}
void TestRenderFrameHost::SendBeginNavigationWithURL(const GURL& url) {
- FrameHostMsg_BeginNavigation_Params begin_params;
+ BeginNavigationParams begin_params(
+ "GET", std::string(), net::LOAD_NORMAL, false);
CommonNavigationParams common_params;
- begin_params.method = "GET";
- begin_params.load_flags = net::LOAD_NORMAL;
- begin_params.has_user_gesture = false;
common_params.url = url;
common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault);
common_params.transition = ui::PAGE_TRANSITION_LINK;
- OnBeginNavigation(begin_params, common_params);
+ OnBeginNavigation(common_params, begin_params,
+ scoped_refptr<ResourceRequestBody>());
}
void TestRenderFrameHost::DidDisownOpener() {
@@ -226,7 +226,7 @@ void TestRenderFrameHost::PrepareForCommit(const GURL& url) {
// We may not have simulated the renderer response to the navigation request.
// Do that now.
if (request->state() == NavigationRequest::WAITING_FOR_RENDERER_RESPONSE)
- SendBeginNavigationWithURL(url);
+ SendBeforeUnloadACK(true);
// We have already simulated the IO thread commit. Only the
// DidCommitProvisionalLoad from the renderer is missing.
« no previous file with comments | « content/test/test_navigation_url_loader_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698