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

Unified Diff: content/test/test_render_frame_host.cc

Issue 101573003: Add the navigation redirect-chain to Sync sessions proto for offline analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Brett's comment on patch set 46, and rebase. Created 6 years, 8 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/test/test_render_frame_host.h ('k') | content/test/test_render_view_host.cc » ('j') | 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 305fc73e0723558f863978c52a01cbb2f0e5fb56..9eb1eaae6d9a61d72d9b6f26a5a6e00f010d1142 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -57,8 +57,8 @@ void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode(
// so we keep a copy of it to use in SendNavigateWithParameters.
GURL url_copy(url);
OnDidStartProvisionalLoadForFrame(-1, url_copy);
- SendNavigateWithParameters(
- page_id, url_copy, transition, url_copy, response_code, 0);
+ SendNavigateWithParameters(page_id, url_copy, transition, url_copy,
+ response_code, 0, std::vector<GURL>());
}
void TestRenderFrameHost::SendNavigateWithOriginalRequestURL(
@@ -66,16 +66,16 @@ void TestRenderFrameHost::SendNavigateWithOriginalRequestURL(
const GURL& url,
const GURL& original_request_url) {
OnDidStartProvisionalLoadForFrame(-1, url);
- SendNavigateWithParameters(
- page_id, url, PAGE_TRANSITION_LINK, original_request_url, 200, 0);
+ SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK,
+ original_request_url, 200, 0, std::vector<GURL>());
}
void TestRenderFrameHost::SendNavigateWithFile(
int page_id,
const GURL& url,
const base::FilePath& file_path) {
- SendNavigateWithParameters(
- page_id, url, PAGE_TRANSITION_LINK, url, 200, &file_path);
+ SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, url, 200,
+ &file_path, std::vector<GURL>());
}
void TestRenderFrameHost::SendNavigateWithParams(
@@ -84,19 +84,28 @@ void TestRenderFrameHost::SendNavigateWithParams(
OnNavigate(msg);
}
+void TestRenderFrameHost::SendNavigateWithRedirects(
+ int page_id,
+ const GURL& url,
+ const std::vector<GURL>& redirects) {
+ SendNavigateWithParameters(
+ page_id, url, PAGE_TRANSITION_LINK, url, 200, 0, redirects);
+}
+
void TestRenderFrameHost::SendNavigateWithParameters(
int page_id,
const GURL& url,
PageTransition transition,
const GURL& original_request_url,
int response_code,
- const base::FilePath* file_path_for_history_item) {
+ const base::FilePath* file_path_for_history_item,
+ const std::vector<GURL>& redirects) {
FrameHostMsg_DidCommitProvisionalLoad_Params params;
params.page_id = page_id;
params.url = url;
params.referrer = Referrer();
params.transition = transition;
- params.redirects = std::vector<GURL>();
+ params.redirects = redirects;
params.should_update_history = true;
params.searchable_form_url = GURL();
params.searchable_form_encoding = std::string();
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | content/test/test_render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698