summaryrefslogtreecommitdiffstats
path: root/content/test/test_render_frame_host.h
diff options
context:
space:
mode:
authorcarlosk <carlosk@chromium.org>2015-03-04 02:46:17 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-04 10:46:51 +0000
commitd6a4ef36ace903fd35bbe2e6ef2f87f690fb2bc9 (patch)
treeea280ae10466ce3c6ad6d5019d338647e77e9007 /content/test/test_render_frame_host.h
parent10f7c9d7b6a1606313f095a569548f39f47200c6 (diff)
downloadchromium_src-d6a4ef36ace903fd35bbe2e6ef2f87f690fb2bc9.zip
chromium_src-d6a4ef36ace903fd35bbe2e6ef2f87f690fb2bc9.tar.gz
chromium_src-d6a4ef36ace903fd35bbe2e6ef2f87f690fb2bc9.tar.bz2
PlzNavigate: test updates post beforeUnload IPC refactor.
This CL adapts several test classes with changes due now that the IPCS for beforeUnload ack and renderer navigation requests are not one and the same anymore. BUG=440266 Review URL: https://codereview.chromium.org/953503002 Cr-Commit-Position: refs/heads/master@{#319049}
Diffstat (limited to 'content/test/test_render_frame_host.h')
-rw-r--r--content/test/test_render_frame_host.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/content/test/test_render_frame_host.h b/content/test/test_render_frame_host.h
index fcf4a74..333c2d7 100644
--- a/content/test/test_render_frame_host.h
+++ b/content/test/test_render_frame_host.h
@@ -85,7 +85,11 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
int response_code,
const base::FilePath* file_path_for_history_item,
const std::vector<GURL>& redirects);
- void SendBeginNavigationWithURL(const GURL& url, bool has_user_gesture);
+
+ // With the current navigation logic this method is a no-op.
+ // PlzNavigate: this method simulates receiving a BeginNavigation IPC.
+ void SendRendererInitiatedNavigationRequest(const GURL& url,
+ bool has_user_gesture);
void DidDisownOpener();
@@ -102,7 +106,13 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
// this simulates a BeforeUnload ACK from the renderer.
// PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the
// interaction with the IO thread up until the response is ready to commit.
- void PrepareForCommit(const GURL& url);
+ void PrepareForCommit();
+
+ // This method does the same as PrepareForCommit.
+ // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will
+ // also simulate a server redirect to |redirect_url|. If the URL is empty the
+ // redirect step is ignored.
+ void PrepareForCommitWithServerRedirect(const GURL& redirect_url);
// Simulate receiving a FrameHostMsg_BeforeUnloadHandlersPresent.
void SendBeforeUnloadHandlersPresent(bool present);