Index: content/test/test_render_frame_host.h |
diff --git a/content/test/test_render_frame_host.h b/content/test/test_render_frame_host.h |
index fcf4a743655636f287c6fdd66b1c4cc16bcedf84..586abf5ab060676044d6b32f7ad47e6723c470c7 100644 |
--- a/content/test/test_render_frame_host.h |
+++ b/content/test/test_render_frame_host.h |
@@ -85,6 +85,9 @@ class TestRenderFrameHost : public RenderFrameHostImpl, |
int response_code, |
const base::FilePath* file_path_for_history_item, |
const std::vector<GURL>& redirects); |
+ |
+ // Normally this is a no-op. |
clamy
2015/02/25 14:29:49
nit: I think you could add a sentence about the in
carlosk
2015/02/25 16:08:00
I followed what was done in other similarly commen
|
+ // PlzNavigate: this method simulates receiving a navigation request IPC. |
clamy
2015/02/25 14:29:49
s/navigation request/BeginNavigation
carlosk
2015/02/25 16:08:00
Done.
|
void SendBeginNavigationWithURL(const GURL& url, bool has_user_gesture); |
void DidDisownOpener(); |
@@ -102,7 +105,12 @@ 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 IPC to |redirect_url|. |
+ void PrepareForCommitWithServerRedirect(const GURL& redirect_url); |
// Simulate receiving a FrameHostMsg_BeforeUnloadHandlersPresent. |
void SendBeforeUnloadHandlersPresent(bool present); |
@@ -111,6 +119,12 @@ class TestRenderFrameHost : public RenderFrameHostImpl, |
void SendUnloadHandlersPresent(bool present); |
private: |
+ |
+ // Actual implementation of both PrepareForCommit* methods. |
+ // PlzNavigate: If |redirect_url| is not nullptr, it will be used to simulate |
+ // a PlzNavigate server redirect. |
+ void PrepareForCommitInternal(const GURL* redirect_url); |
+ |
TestRenderFrameHostCreationObserver child_creation_observer_; |
std::string contents_mime_type_; |