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

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

Issue 1794513003: Don't rely on the pending NavigationEntry for location.replace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const GURL& url) override; 73 const GURL& url) override;
74 void SendNavigateWithTransition(int page_id, 74 void SendNavigateWithTransition(int page_id,
75 int nav_entry_id, 75 int nav_entry_id,
76 bool did_create_new_entry, 76 bool did_create_new_entry,
77 const GURL& url, 77 const GURL& url,
78 ui::PageTransition transition) override; 78 ui::PageTransition transition) override;
79 void SetContentsMimeType(const std::string& mime_type) override; 79 void SetContentsMimeType(const std::string& mime_type) override;
80 void SendBeforeUnloadACK(bool proceed) override; 80 void SendBeforeUnloadACK(bool proceed) override;
81 void SimulateSwapOutACK() override; 81 void SimulateSwapOutACK() override;
82 82
83 void SendNavigateWithReplacement(int page_id,
84 int nav_entry_id,
85 bool did_create_new_entry,
86 const GURL& url);
87
83 using ModificationCallback = 88 using ModificationCallback =
84 base::Callback<void(FrameHostMsg_DidCommitProvisionalLoad_Params*)>; 89 base::Callback<void(FrameHostMsg_DidCommitProvisionalLoad_Params*)>;
85 90
86 void SendNavigateWithModificationCallback( 91 void SendNavigateWithModificationCallback(
87 int page_id, 92 int page_id,
88 int nav_entry_id, 93 int nav_entry_id,
89 bool did_create_new_entry, 94 bool did_create_new_entry,
90 const GURL& url, 95 const GURL& url,
91 const ModificationCallback& callback); 96 const ModificationCallback& callback);
92 void SendNavigateWithParams( 97 void SendNavigateWithParams(
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void PrepareForCommitWithServerRedirect(const GURL& redirect_url); 133 void PrepareForCommitWithServerRedirect(const GURL& redirect_url);
129 134
130 // PlzNavigate 135 // PlzNavigate
131 void set_pending_commit(bool pending) { pending_commit_ = pending; } 136 void set_pending_commit(bool pending) { pending_commit_ = pending; }
132 bool pending_commit() const { return pending_commit_; } 137 bool pending_commit() const { return pending_commit_; }
133 138
134 private: 139 private:
135 void SendNavigateWithParameters(int page_id, 140 void SendNavigateWithParameters(int page_id,
136 int nav_entry_id, 141 int nav_entry_id,
137 bool did_create_new_entry, 142 bool did_create_new_entry,
143 bool should_replace_entry,
138 const GURL& url, 144 const GURL& url,
139 ui::PageTransition transition, 145 ui::PageTransition transition,
140 int response_code, 146 int response_code,
141 const ModificationCallback& callback); 147 const ModificationCallback& callback);
142 148
143 // Computes the page ID for a pending navigation in this RenderFrameHost; 149 // Computes the page ID for a pending navigation in this RenderFrameHost;
144 int32_t ComputeNextPageID(); 150 int32_t ComputeNextPageID();
145 151
146 TestRenderFrameHostCreationObserver child_creation_observer_; 152 TestRenderFrameHostCreationObserver child_creation_observer_;
147 153
148 std::string contents_mime_type_; 154 std::string contents_mime_type_;
149 155
150 // See set_simulate_history_list_was_cleared() above. 156 // See set_simulate_history_list_was_cleared() above.
151 bool simulate_history_list_was_cleared_; 157 bool simulate_history_list_was_cleared_;
152 158
153 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); 159 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
154 }; 160 };
155 161
156 } // namespace content 162 } // namespace content
157 163
158 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 164 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698