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

Unified Diff: net/http/http_auth_handler_digest_unittest.cc

Issue 1151843002: DO NOT LAND Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More. Created 5 years, 7 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: net/http/http_auth_handler_digest_unittest.cc
diff --git a/net/http/http_auth_handler_digest_unittest.cc b/net/http/http_auth_handler_digest_unittest.cc
index 8b5179e19261ced094ea1e6537e351287ddbc6e6..41e77428c5c8042a878db73ef498b38b7b2de0f0 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -13,6 +13,7 @@
#include "net/http/http_auth_handler_digest.h"
#include "net/http/http_request_info.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "url/origin.h"
namespace net {
@@ -53,9 +54,10 @@ bool RespondToChallenge(HttpAuth::Target target,
scoped_ptr<HttpAuthHandler> handler;
// Create a handler for a particular challenge.
- GURL url_origin(target == HttpAuth::AUTH_SERVER ? request_url : proxy_name);
+ url::Origin url_origin(target == HttpAuth::AUTH_SERVER ? request_url
+ : proxy_name);
int rv_create = factory->CreateAuthHandlerFromString(
- challenge, target, url_origin.GetOrigin(), BoundNetLog(), &handler);
+ challenge, target, url_origin, BoundNetLog(), &handler);
if (rv_create != OK || handler.get() == NULL) {
ADD_FAILURE() << "Unable to create auth handler.";
return false;
@@ -348,7 +350,7 @@ TEST(HttpAuthHandlerDigestTest, ParseChallenge) {
},
};
- GURL origin("http://www.example.com");
+ url::Origin origin("http://www.example.com");
scoped_ptr<HttpAuthHandlerDigest::Factory> factory(
new HttpAuthHandlerDigest::Factory());
for (size_t i = 0; i < arraysize(tests); ++i) {
@@ -513,7 +515,7 @@ TEST(HttpAuthHandlerDigestTest, AssembleCredentials) {
"qop=auth, nc=00000001, cnonce=\"15c07961ed8575c4\""
}
};
- GURL origin("http://www.example.com");
+ url::Origin origin("http://www.example.com");
scoped_ptr<HttpAuthHandlerDigest::Factory> factory(
new HttpAuthHandlerDigest::Factory());
for (size_t i = 0; i < arraysize(tests); ++i) {
@@ -547,7 +549,7 @@ TEST(HttpAuthHandlerDigest, HandleAnotherChallenge) {
scoped_ptr<HttpAuthHandler> handler;
std::string default_challenge =
"Digest realm=\"Oblivion\", nonce=\"nonce-value\"";
- GURL origin("intranet.google.com");
+ url::Origin origin("http://intranet.google.com");
int rv = factory->CreateAuthHandlerFromString(
default_challenge, HttpAuth::AUTH_SERVER, origin, BoundNetLog(),
&handler);

Powered by Google App Engine
This is Rietveld 408576698