| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the | 107 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the |
| 108 // interaction with the IO thread up until the response is ready to commit. | 108 // interaction with the IO thread up until the response is ready to commit. |
| 109 void PrepareForCommit(); | 109 void PrepareForCommit(); |
| 110 | 110 |
| 111 // This method does the same as PrepareForCommit. | 111 // This method does the same as PrepareForCommit. |
| 112 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will | 112 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will |
| 113 // also simulate a server redirect to |redirect_url|. If the URL is empty the | 113 // also simulate a server redirect to |redirect_url|. If the URL is empty the |
| 114 // redirect step is ignored. | 114 // redirect step is ignored. |
| 115 void PrepareForCommitWithServerRedirect(const GURL& redirect_url); | 115 void PrepareForCommitWithServerRedirect(const GURL& redirect_url); |
| 116 | 116 |
| 117 // Simulate receiving a FrameHostMsg_BeforeUnloadHandlersPresent. | |
| 118 void SendBeforeUnloadHandlersPresent(bool present); | |
| 119 | |
| 120 // Simulate receiving a FrameHostMsg_UnloadHandlersPresent. | |
| 121 void SendUnloadHandlersPresent(bool present); | |
| 122 | |
| 123 private: | 117 private: |
| 124 TestRenderFrameHostCreationObserver child_creation_observer_; | 118 TestRenderFrameHostCreationObserver child_creation_observer_; |
| 125 | 119 |
| 126 std::string contents_mime_type_; | 120 std::string contents_mime_type_; |
| 127 | 121 |
| 128 // See set_simulate_history_list_was_cleared() above. | 122 // See set_simulate_history_list_was_cleared() above. |
| 129 bool simulate_history_list_was_cleared_; | 123 bool simulate_history_list_was_cleared_; |
| 130 | 124 |
| 131 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 125 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
| 132 }; | 126 }; |
| 133 | 127 |
| 134 } // namespace content | 128 } // namespace content |
| 135 | 129 |
| 136 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 130 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| OLD | NEW |