Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: content/test/test_render_frame_host.h

Issue 2296483002: Fix some unit_tests under PlzNavigate (Closed)
Patch Set: not in public interface Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the 125 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the
126 // interaction with the IO thread up until the response is ready to commit. 126 // interaction with the IO thread up until the response is ready to commit.
127 void PrepareForCommit(); 127 void PrepareForCommit();
128 128
129 // This method does the same as PrepareForCommit. 129 // This method does the same as PrepareForCommit.
130 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will 130 // PlzNavigate: Beyond doing the same as PrepareForCommit, this method will
131 // also simulate a server redirect to |redirect_url|. If the URL is empty the 131 // also simulate a server redirect to |redirect_url|. If the URL is empty the
132 // redirect step is ignored. 132 // redirect step is ignored.
133 void PrepareForCommitWithServerRedirect(const GURL& redirect_url); 133 void PrepareForCommitWithServerRedirect(const GURL& redirect_url);
134 134
135 // If we are doing a cross-site navigation, this simulates the current
136 // RenderFrameHost notifying that BeforeUnload has executed so the pending
137 // RenderFrameHost is resumed and can navigate.
138 // PlzNavigate: This simulates a BeforeUnload ACK from the renderer, and the
139 // interaction with the IO thread up until the response is ready to commit.
140 void PrepareForCommitIfNecessary();
141
135 // PlzNavigate 142 // PlzNavigate
136 void set_pending_commit(bool pending) { pending_commit_ = pending; } 143 void set_pending_commit(bool pending) { pending_commit_ = pending; }
137 bool pending_commit() const { return pending_commit_; } 144 bool pending_commit() const { return pending_commit_; }
138 145
139 // Creates a WebBluetooth Service with a dummy InterfaceRequest. 146 // Creates a WebBluetooth Service with a dummy InterfaceRequest.
140 WebBluetoothServiceImpl* CreateWebBluetoothServiceForTesting(); 147 WebBluetoothServiceImpl* CreateWebBluetoothServiceForTesting();
141 148
142 private: 149 private:
143 void SendNavigateWithParameters(int page_id, 150 void SendNavigateWithParameters(int page_id,
144 int nav_entry_id, 151 int nav_entry_id,
(...skipping 15 matching lines...) Expand all
160 167
161 // See set_simulate_history_list_was_cleared() above. 168 // See set_simulate_history_list_was_cleared() above.
162 bool simulate_history_list_was_cleared_; 169 bool simulate_history_list_was_cleared_;
163 170
164 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); 171 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
165 }; 172 };
166 173
167 } // namespace content 174 } // namespace content
168 175
169 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 176 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/test/browser_side_navigation_test_utils.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698