OLD | NEW |
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 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void DidDisownOpener(); | 116 void DidDisownOpener(); |
117 | 117 |
118 // If set, navigations will appear to have cleared the history list in the | 118 // If set, navigations will appear to have cleared the history list in the |
119 // RenderFrame | 119 // RenderFrame |
120 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). | 120 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). |
121 // False by default. | 121 // False by default. |
122 void set_simulate_history_list_was_cleared(bool cleared) { | 122 void set_simulate_history_list_was_cleared(bool cleared) { |
123 simulate_history_list_was_cleared_ = cleared; | 123 simulate_history_list_was_cleared_ = cleared; |
124 } | 124 } |
125 | 125 |
| 126 // Simulates initialization of the RenderFrame object in the renderer process |
| 127 // and ensures internal state of RenderFrameHost is ready for simulating |
| 128 // RenderFrame originated IPCs. |
| 129 void InitializeRenderFrameIfNeeded(); |
| 130 |
126 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to | 131 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to |
127 // a state where a new navigation can be committed by a renderer. Currently, | 132 // a state where a new navigation can be committed by a renderer. Currently, |
128 // this simulates a BeforeUnload ACK from the renderer. | 133 // this simulates a BeforeUnload ACK from the renderer. |
129 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the | 134 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the |
130 // interaction with the IO thread up until the response is ready to commit. | 135 // interaction with the IO thread up until the response is ready to commit. |
131 void PrepareForCommit(); | 136 void PrepareForCommit(); |
132 | 137 |
133 // This method does the same as PrepareForCommit. | 138 // This method does the same as PrepareForCommit. |
134 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will | 139 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will |
135 // also simulate a server redirect to |redirect_url|. If the URL is empty the | 140 // also simulate a server redirect to |redirect_url|. If the URL is empty the |
(...skipping 11 matching lines...) Expand all Loading... |
147 | 152 |
148 // See set_simulate_history_list_was_cleared() above. | 153 // See set_simulate_history_list_was_cleared() above. |
149 bool simulate_history_list_was_cleared_; | 154 bool simulate_history_list_was_cleared_; |
150 | 155 |
151 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 156 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
152 }; | 157 }; |
153 | 158 |
154 } // namespace content | 159 } // namespace content |
155 | 160 |
156 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 161 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |