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

Unified Diff: net/http/http_auth_handler_digest_unittest.cc

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comments Created 9 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_digest.cc ('k') | net/http/http_auth_handler_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1f154cab52b1350c9d7d65a859d4684a22eccee7..0bce2a4a3a13ba33a9e446cf53a2c89b2b940f8d 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -67,10 +67,9 @@ bool RespondToChallenge(HttpAuth::Target target,
TestOldCompletionCallback callback;
scoped_ptr<HttpRequestInfo> request(new HttpRequestInfo());
request->url = GURL(request_url);
- const string16 kFoo = ASCIIToUTF16("foo");
- const string16 kBar = ASCIIToUTF16("bar");
+ AuthCredentials credentials(ASCIIToUTF16("foo"), ASCIIToUTF16("bar"));
int rv_generate = handler->GenerateAuthToken(
- &kFoo, &kBar, request.get(), &callback, token);
+ &credentials, request.get(), &callback, token);
if (rv_generate != OK) {
ADD_FAILURE() << "Problems generating auth token";
return false;
@@ -530,8 +529,9 @@ TEST(HttpAuthHandlerDigestTest, AssembleCredentials) {
std::string creds =
digest->AssembleCredentials(tests[i].req_method,
tests[i].req_path,
- ASCIIToUTF16(tests[i].username),
- ASCIIToUTF16(tests[i].password),
+ AuthCredentials(
+ ASCIIToUTF16(tests[i].username),
+ ASCIIToUTF16(tests[i].password)),
tests[i].cnonce,
tests[i].nonce_count);
« no previous file with comments | « net/http/http_auth_handler_digest.cc ('k') | net/http/http_auth_handler_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698