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

Unified Diff: content/test/test_render_frame_host.cc

Issue 304763002: Trust the renderer's same-document navigation flag if it is a same-origin nav. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: isNavigationInPage->isFragmentNavigation, with caveat on the name Created 6 years, 7 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
« no previous file with comments | « content/public/test/test_renderer_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9eb1eaae6d9a61d72d9b6f26a5a6e00f010d1142..98408fb444023036eba2ea7654b62e59010fdea0 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -46,7 +46,7 @@ void TestRenderFrameHost::SendNavigateWithTransition(
void TestRenderFrameHost::SendFailedNavigate(int page_id, const GURL& url) {
SendNavigateWithTransitionAndResponseCode(
- page_id, url, PAGE_TRANSITION_LINK, 500);
+ page_id, url, PAGE_TRANSITION_RELOAD, 500);
}
void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode(
@@ -113,13 +113,19 @@ void TestRenderFrameHost::SendNavigateWithParameters(
params.gesture = NavigationGestureUser;
params.contents_mime_type = contents_mime_type_;
params.is_post = false;
- params.was_within_same_page = false;
params.http_status_code = response_code;
params.socket_address.set_host("2001:db8::1");
params.socket_address.set_port(80);
params.history_list_was_cleared = simulate_history_list_was_cleared_;
params.original_request_url = original_request_url;
+ url::Replacements<char> replacements;
+ replacements.ClearRef();
+ params.was_within_same_page = transition != PAGE_TRANSITION_RELOAD &&
+ transition != PAGE_TRANSITION_TYPED &&
+ url.ReplaceComponents(replacements) ==
+ GetLastCommittedURL().ReplaceComponents(replacements);
+
params.page_state = PageState::CreateForTesting(
url,
false,
« no previous file with comments | « content/public/test/test_renderer_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698