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

Unified Diff: content/child/resource_dispatcher_unittest.cc

Issue 398903002: Plumb redirect info out of net, through content, and into child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin comments Created 6 years, 4 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/child/resource_dispatcher.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher_unittest.cc
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index 4e95428c7da51f92db26c8efbf0a9c05ff21c782..d878e376b1632d0c3841d83439f35593ee1ca3bb 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -59,8 +59,7 @@ class TestRequestPeer : public RequestPeer {
virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE {
}
- virtual bool OnReceivedRedirect(const GURL& new_url,
- const GURL& new_first_party_for_cookies,
+ virtual bool OnReceivedRedirect(const net::RedirectInfo& redirect_info,
const ResourceResponseInfo& info) OVERRIDE {
++seen_redirects_;
if (defer_on_redirect_)
@@ -252,9 +251,13 @@ class ResourceDispatcherTest : public testing::Test, public IPC::Sender {
std::replace(raw_headers.begin(), raw_headers.end(), '\n', '\0');
head.headers = new net::HttpResponseHeaders(raw_headers);
head.error_code = net::OK;
+ net::RedirectInfo redirect_info;
+ redirect_info.status_code = 302;
+ redirect_info.new_method = "GET";
+ redirect_info.new_url = GURL(kTestPageUrl);
+ redirect_info.new_first_party_for_cookies = GURL(kTestPageUrl);
EXPECT_EQ(true, dispatcher_.OnMessageReceived(
- ResourceMsg_ReceivedRedirect(request_id, GURL(kTestPageUrl),
- GURL(kTestPageUrl), head)));
+ ResourceMsg_ReceivedRedirect(request_id, redirect_info, head)));
}
void NotifyReceivedResponse(int request_id) {
@@ -722,8 +725,7 @@ class TimeConversionTest : public ResourceDispatcherTest,
virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE {
}
- virtual bool OnReceivedRedirect(const GURL& new_url,
- const GURL& new_first_party_for_cookies,
+ virtual bool OnReceivedRedirect(const net::RedirectInfo& redirect_info,
const ResourceResponseInfo& info) OVERRIDE {
return true;
}
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698