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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void DidDisownOpener(); | 88 void DidDisownOpener(); |
89 | 89 |
90 // If set, navigations will appear to have cleared the history list in the | 90 // If set, navigations will appear to have cleared the history list in the |
91 // RenderFrame | 91 // RenderFrame |
92 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). | 92 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). |
93 // False by default. | 93 // False by default. |
94 void set_simulate_history_list_was_cleared(bool cleared) { | 94 void set_simulate_history_list_was_cleared(bool cleared) { |
95 simulate_history_list_was_cleared_ = cleared; | 95 simulate_history_list_was_cleared_ = cleared; |
96 } | 96 } |
97 | 97 |
| 98 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to |
| 99 // a state where a new navigation can be committed by a renderer. Currently, |
| 100 // this simulates a BeforeUnload ACK from the renderer. |
| 101 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the |
| 102 // interaction with the IO thread up until the response is ready to commit. |
| 103 void PrepareForCommit(const GURL& url); |
| 104 |
98 private: | 105 private: |
99 TestRenderFrameHostCreationObserver child_creation_observer_; | 106 TestRenderFrameHostCreationObserver child_creation_observer_; |
100 | 107 |
101 std::string contents_mime_type_; | 108 std::string contents_mime_type_; |
102 | 109 |
103 // See set_simulate_history_list_was_cleared() above. | 110 // See set_simulate_history_list_was_cleared() above. |
104 bool simulate_history_list_was_cleared_; | 111 bool simulate_history_list_was_cleared_; |
105 | 112 |
106 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 113 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
107 }; | 114 }; |
108 | 115 |
109 } // namespace content | 116 } // namespace content |
110 | 117 |
111 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 118 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |