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 | |
131 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to | 126 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to |
132 // a state where a new navigation can be committed by a renderer. Currently, | 127 // a state where a new navigation can be committed by a renderer. Currently, |
133 // this simulates a BeforeUnload ACK from the renderer. | 128 // this simulates a BeforeUnload ACK from the renderer. |
134 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the | 129 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the |
135 // interaction with the IO thread up until the response is ready to commit. | 130 // interaction with the IO thread up until the response is ready to commit. |
136 void PrepareForCommit(); | 131 void PrepareForCommit(); |
137 | 132 |
138 // This method does the same as PrepareForCommit. | 133 // This method does the same as PrepareForCommit. |
139 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will | 134 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will |
140 // also simulate a server redirect to |redirect_url|. If the URL is empty the | 135 // also simulate a server redirect to |redirect_url|. If the URL is empty the |
(...skipping 11 matching lines...) Expand all Loading... |
152 | 147 |
153 // See set_simulate_history_list_was_cleared() above. | 148 // See set_simulate_history_list_was_cleared() above. |
154 bool simulate_history_list_was_cleared_; | 149 bool simulate_history_list_was_cleared_; |
155 | 150 |
156 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 151 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
157 }; | 152 }; |
158 | 153 |
159 } // namespace content | 154 } // namespace content |
160 | 155 |
161 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 156 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |