summaryrefslogtreecommitdiffstats
path: root/content/test/test_render_frame_host.cc
diff options
context:
space:
mode:
authorclamy <clamy@chromium.org>2015-02-05 09:39:14 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-05 17:41:16 +0000
commit0ab288e2bdc393fb6b037f725ddd95fe4b39e64c (patch)
treeb23ab74ec1889bc5abc38c572b974fee38db0a12 /content/test/test_render_frame_host.cc
parent8b4c3589c2a26b212cce47aa76acf8d029b4f9a6 (diff)
downloadchromium_src-0ab288e2bdc393fb6b037f725ddd95fe4b39e64c.zip
chromium_src-0ab288e2bdc393fb6b037f725ddd95fe4b39e64c.tar.gz
chromium_src-0ab288e2bdc393fb6b037f725ddd95fe4b39e64c.tar.bz2
PlzNavigate: Remove the RequestNavigation IPC
This CL removes the RequestNavigation IPC. Instead, browser-side navigation will now send a BeforeUnload IPC to the renderer if needed and wait for a BeforeUnloadACK to proceed with navigations. BUG=376006 Review URL: https://codereview.chromium.org/872473003 Cr-Commit-Position: refs/heads/master@{#314830}
Diffstat (limited to 'content/test/test_render_frame_host.cc')
-rw-r--r--content/test/test_render_frame_host.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index 3f72489..0d78f5d 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.