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

Unified Diff: content/test/test_render_frame_host.cc

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 side-by-side diff with in-line comments
Download patch
Index: content/test/test_render_frame_host.cc
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index d805f38ea7c283fe1403dc23279072b5a237d548..9863b897bf193ef0e38164cb04e2ba9b015f0182 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -229,8 +229,8 @@ void TestRenderFrameHost::SendNavigate(int page_id,
int nav_entry_id,
bool did_create_new_entry,
const GURL& url) {
- SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, url,
- ui::PAGE_TRANSITION_LINK, 200,
+ SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, false,
+ url, ui::PAGE_TRANSITION_LINK, 200,
ModificationCallback());
}
@@ -238,8 +238,8 @@ void TestRenderFrameHost::SendFailedNavigate(int page_id,
int nav_entry_id,
bool did_create_new_entry,
const GURL& url) {
- SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, url,
- ui::PAGE_TRANSITION_RELOAD, 500,
+ SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, false,
+ url, ui::PAGE_TRANSITION_RELOAD, 500,
ModificationCallback());
}
@@ -249,8 +249,17 @@ void TestRenderFrameHost::SendNavigateWithTransition(
bool did_create_new_entry,
const GURL& url,
ui::PageTransition transition) {
- SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, url,
- transition, 200, ModificationCallback());
+ SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, false,
+ url, transition, 200, ModificationCallback());
+}
+
+void TestRenderFrameHost::SendNavigateWithReplacement(int page_id,
+ int nav_entry_id,
+ bool did_create_new_entry,
+ const GURL& url) {
+ SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, true,
+ url, ui::PAGE_TRANSITION_LINK, 200,
+ ModificationCallback());
}
void TestRenderFrameHost::SendNavigateWithModificationCallback(
@@ -259,14 +268,15 @@ void TestRenderFrameHost::SendNavigateWithModificationCallback(
bool did_create_new_entry,
const GURL& url,
const ModificationCallback& callback) {
- SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, url,
- ui::PAGE_TRANSITION_LINK, 200, callback);
+ SendNavigateWithParameters(page_id, nav_entry_id, did_create_new_entry, false,
+ url, ui::PAGE_TRANSITION_LINK, 200, callback);
}
void TestRenderFrameHost::SendNavigateWithParameters(
int page_id,
int nav_entry_id,
bool did_create_new_entry,
+ bool should_replace_entry,
const GURL& url,
ui::PageTransition transition,
int response_code,
@@ -286,6 +296,7 @@ void TestRenderFrameHost::SendNavigateWithParameters(
params.transition = transition;
params.should_update_history = true;
params.did_create_new_entry = did_create_new_entry;
+ params.should_replace_current_entry = should_replace_entry;
params.gesture = NavigationGestureUser;
params.contents_mime_type = contents_mime_type_;
params.is_post = false;
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | third_party/WebKit/LayoutTests/FlagExpectations/site-per-process » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698