summaryrefslogtreecommitdiffstats
path: root/content/child/web_url_loader_impl_unittest.cc
diff options
context:
space:
mode:
authordavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 20:49:59 +0000
committerdavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 20:51:41 +0000
commitcba246463b2bda73877fc53da6d7eff97448d93d (patch)
treec8a77dfaff426ea06667b3714e4af2d9ed3b7d94 /content/child/web_url_loader_impl_unittest.cc
parent7d0a0cac7c1233e6beeaf7ca8092f89f81e950ef (diff)
downloadchromium_src-cba246463b2bda73877fc53da6d7eff97448d93d.zip
chromium_src-cba246463b2bda73877fc53da6d7eff97448d93d.tar.gz
chromium_src-cba246463b2bda73877fc53da6d7eff97448d93d.tar.bz2
Plumb redirect info out of net, through content, and into child processes.
This saves the logic in PluginURLFetcher and WebURLLoader that has to replicate the method-munging, referrer-munging, and first-party-URL-munging logic that is already done in net/. BUG=384609 Review URL: https://codereview.chromium.org/398903002 Cr-Commit-Position: refs/heads/master@{#290005} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child/web_url_loader_impl_unittest.cc')
-rw-r--r--content/child/web_url_loader_impl_unittest.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/content/child/web_url_loader_impl_unittest.cc b/content/child/web_url_loader_impl_unittest.cc
index 81b6779..0adfe08 100644
--- a/content/child/web_url_loader_impl_unittest.cc
+++ b/content/child/web_url_loader_impl_unittest.cc
@@ -15,6 +15,7 @@
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
+#include "net/url_request/redirect_info.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
@@ -281,7 +282,12 @@ class WebURLLoaderImplTest : public testing::Test {
void DoReceiveRedirect() {
EXPECT_FALSE(client()->did_receive_redirect());
- peer()->OnReceivedRedirect(GURL(kTestURL), GURL(kTestURL),
+ net::RedirectInfo redirect_info;
+ redirect_info.status_code = 302;
+ redirect_info.new_method = "GET";
+ redirect_info.new_url = GURL(kTestURL);
+ redirect_info.new_first_party_for_cookies = GURL(kTestURL);
+ peer()->OnReceivedRedirect(redirect_info,
content::ResourceResponseInfo());
EXPECT_TRUE(client()->did_receive_redirect());
}