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

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 comments from creis on patch set 43. Created 6 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 ec6a34979aa90ebbdef95de44970d847d5b8648f..481327984bdae49d281248e615945c910ee35651 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -63,8 +63,13 @@ void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode(
// so we keep a copy of it to use in SendNavigateWithParameters.
GURL url_copy(url);
OnDidStartProvisionalLoadForFrame(kFrameId, -1, true, url_copy);
- SendNavigateWithParameters(
- page_id, url_copy, transition, url_copy, response_code, 0);
+ SendNavigateWithParameters(page_id,
+ url_copy,
Charlie Reis 2014/04/05 00:09:10 Style nit: There's no need to put each function pa
Donn Denman 2014/04/09 21:09:21 Done.
+ transition,
+ url_copy,
+ response_code,
+ 0,
+ std::vector<GURL>());
}
void TestRenderFrameHost::SendNavigateWithOriginalRequestURL(
@@ -72,16 +77,26 @@ void TestRenderFrameHost::SendNavigateWithOriginalRequestURL(
const GURL& url,
const GURL& original_request_url) {
OnDidStartProvisionalLoadForFrame(kFrameId, -1, true, 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(
@@ -90,6 +105,13 @@ void TestRenderFrameHost::SendNavigateWithParams(
FrameHostMsg_DidCommitProvisionalLoad msg(1, *params);
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,
@@ -97,14 +119,15 @@ void TestRenderFrameHost::SendNavigateWithParameters(
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.frame_id = kFrameId;
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();

Powered by Google App Engine
This is Rietveld 408576698