| 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 |
| 138 // Creates a WebBluetooth Service with a dummy InterfaceRequest. | 142 // Creates a WebBluetooth Service with a dummy InterfaceRequest. |
| 139 WebBluetoothServiceImpl* CreateWebBluetoothServiceForTesting(); | 143 WebBluetoothServiceImpl* CreateWebBluetoothServiceForTesting(); |
| 140 | 144 |
| 141 private: | 145 private: |
| 142 void SendNavigateWithParameters(int nav_entry_id, | 146 void SendNavigateWithParameters(int nav_entry_id, |
| 143 bool did_create_new_entry, | 147 bool did_create_new_entry, |
| 144 bool should_replace_entry, | 148 bool should_replace_entry, |
| 145 const GURL& url, | 149 const GURL& url, |
| 146 ui::PageTransition transition, | 150 ui::PageTransition transition, |
| 147 int response_code, | 151 int response_code, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 161 | 165 |
| 162 // The last commit was for an error page. | 166 // The last commit was for an error page. |
| 163 bool last_commit_was_error_page_; | 167 bool last_commit_was_error_page_; |
| 164 | 168 |
| 165 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 169 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
| 166 }; | 170 }; |
| 167 | 171 |
| 168 } // namespace content | 172 } // namespace content |
| 169 | 173 |
| 170 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 174 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| OLD | NEW |