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

Unified Diff: net/http/http_auth_unittest.cc

Issue 242135: Merge r25564 and r26588 from the trunk.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Undo an extraneous comment change Created 11 years, 2 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 | « net/http/http_auth_handler_ntlm_win.cc ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_unittest.cc
===================================================================
--- net/http/http_auth_unittest.cc (revision 28069)
+++ net/http/http_auth_unittest.cc (working copy)
@@ -48,6 +48,7 @@
"",
}
};
+ GURL origin("http://www.example.com");
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
// Make a HttpResponseHeaders object.
@@ -62,6 +63,7 @@
scoped_refptr<HttpAuthHandler> handler;
HttpAuth::ChooseBestChallenge(headers.get(),
HttpAuth::AUTH_SERVER,
+ origin,
&handler);
if (handler) {
@@ -99,6 +101,7 @@
"",
}
};
+ GURL origin("http://www.example.com");
scoped_refptr<HttpAuthHandler> handler;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
@@ -114,6 +117,7 @@
scoped_refptr<HttpAuthHandler> old_handler = handler;
HttpAuth::ChooseBestChallenge(headers.get(),
HttpAuth::AUTH_SERVER,
+ origin,
&handler);
EXPECT_TRUE(handler != NULL);
@@ -229,10 +233,13 @@
}
TEST(HttpAuthTest, CreateAuthHandler) {
+ GURL server_origin("http://www.example.com");
+ GURL proxy_origin("http://cache.example.com:3128");
{
scoped_refptr<HttpAuthHandler> handler;
HttpAuth::CreateAuthHandler("Basic realm=\"FooBar\"",
HttpAuth::AUTH_SERVER,
+ server_origin,
&handler);
EXPECT_FALSE(handler.get() == NULL);
EXPECT_STREQ("basic", handler->scheme().c_str());
@@ -245,6 +252,7 @@
scoped_refptr<HttpAuthHandler> handler;
HttpAuth::CreateAuthHandler("UNSUPPORTED realm=\"FooBar\"",
HttpAuth::AUTH_SERVER,
+ server_origin,
&handler);
EXPECT_TRUE(handler.get() == NULL);
}
@@ -252,6 +260,7 @@
scoped_refptr<HttpAuthHandler> handler;
HttpAuth::CreateAuthHandler("Digest realm=\"FooBar\", nonce=\"xyz\"",
HttpAuth::AUTH_PROXY,
+ proxy_origin,
&handler);
EXPECT_FALSE(handler.get() == NULL);
EXPECT_STREQ("digest", handler->scheme().c_str());
@@ -264,6 +273,7 @@
scoped_refptr<HttpAuthHandler> handler;
HttpAuth::CreateAuthHandler("NTLM",
HttpAuth::AUTH_SERVER,
+ server_origin,
&handler);
EXPECT_FALSE(handler.get() == NULL);
EXPECT_STREQ("ntlm", handler->scheme().c_str());
« no previous file with comments | « net/http/http_auth_handler_ntlm_win.cc ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698