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

Unified Diff: content/test/test_render_frame_host.cc

Issue 1672373002: Don't rely on the pending NavigationEntry for location.replace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug numbers Created 4 years, 10 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 932dbf7fed8589e28d7ee91d086cd3953067cc3c..5f60a2c41b7c8f67637279fdb6dfb18fa7faf30f 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -224,8 +224,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());
}
@@ -233,8 +233,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());
}
@@ -244,8 +244,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(
@@ -254,14 +263,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,
@@ -279,6 +289,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