| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // RenderFrameHost notifying that BeforeUnload has executed so the pending | 128 // RenderFrameHost notifying that BeforeUnload has executed so the pending |
| 129 // RenderFrameHost is resumed and can navigate. | 129 // RenderFrameHost is resumed and can navigate. |
| 130 // PlzNavigate: This simulates a BeforeUnload ACK from the renderer, and the | 130 // PlzNavigate: This simulates a BeforeUnload ACK from the renderer, and the |
| 131 // interaction with the IO thread up until the response is ready to commit. | 131 // interaction with the IO thread up until the response is ready to commit. |
| 132 void PrepareForCommitIfNecessary(); | 132 void PrepareForCommitIfNecessary(); |
| 133 | 133 |
| 134 // PlzNavigate | 134 // PlzNavigate |
| 135 void set_pending_commit(bool pending) { pending_commit_ = pending; } | 135 void set_pending_commit(bool pending) { pending_commit_ = pending; } |
| 136 bool pending_commit() const { return pending_commit_; } | 136 bool pending_commit() const { return pending_commit_; } |
| 137 | 137 |
| 138 // Simulates the renderer informing the browser that the frame has an | |
| 139 // onbeforeunload handler. | |
| 140 void set_has_beforeunload_handlers() { has_beforeunload_handlers_ = true; } | |
| 141 | |
| 142 // Creates a WebBluetooth Service with a dummy InterfaceRequest. | 138 // Creates a WebBluetooth Service with a dummy InterfaceRequest. |
| 143 WebBluetoothServiceImpl* CreateWebBluetoothServiceForTesting(); | 139 WebBluetoothServiceImpl* CreateWebBluetoothServiceForTesting(); |
| 144 | 140 |
| 145 private: | 141 private: |
| 146 void SendNavigateWithParameters(int nav_entry_id, | 142 void SendNavigateWithParameters(int nav_entry_id, |
| 147 bool did_create_new_entry, | 143 bool did_create_new_entry, |
| 148 bool should_replace_entry, | 144 bool should_replace_entry, |
| 149 const GURL& url, | 145 const GURL& url, |
| 150 ui::PageTransition transition, | 146 ui::PageTransition transition, |
| 151 int response_code, | 147 int response_code, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 165 | 161 |
| 166 // The last commit was for an error page. | 162 // The last commit was for an error page. |
| 167 bool last_commit_was_error_page_; | 163 bool last_commit_was_error_page_; |
| 168 | 164 |
| 169 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 165 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
| 170 }; | 166 }; |
| 171 | 167 |
| 172 } // namespace content | 168 } // namespace content |
| 173 | 169 |
| 174 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 170 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| OLD | NEW |