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

Unified Diff: net/http/http_auth_handler_digest_unittest.cc

Issue 1383613002: [net/http auth] Cleanup. Method names, and constness. Base URL: https://chromium.googlesource.com/chromium/src.git@mock-auth-handler-generalization
Patch Set: Created 5 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_factory.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 d8ae5b54f9f0114d8d9d7634bc24536b0b02a953..af912f5d905f81ab20a697eb5f1063e7fdfcd298 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -70,8 +70,8 @@ bool RespondToChallenge(HttpAuth::Target target,
request->url = GURL(request_url);
AuthCredentials credentials(base::ASCIIToUTF16("foo"),
base::ASCIIToUTF16("bar"));
- int rv_generate = handler->GenerateAuthToken(
- &credentials, request.get(), callback.callback(), token);
+ int rv_generate = handler->GenerateAuthToken(&credentials, *request,
+ callback.callback(), token);
if (rv_generate != OK) {
ADD_FAILURE() << "Problems generating auth token";
return false;
@@ -554,26 +554,26 @@ TEST(HttpAuthHandlerDigest, HandleAnotherChallenge) {
HttpAuthChallengeTokenizer tok_default(default_challenge.begin(),
default_challenge.end());
EXPECT_EQ(HttpAuth::AUTHORIZATION_RESULT_REJECT,
- handler->HandleAnotherChallenge(&tok_default));
+ handler->HandleAnotherChallenge(tok_default));
std::string stale_challenge = default_challenge + ", stale=true";
HttpAuthChallengeTokenizer tok_stale(stale_challenge.begin(),
stale_challenge.end());
EXPECT_EQ(HttpAuth::AUTHORIZATION_RESULT_STALE,
- handler->HandleAnotherChallenge(&tok_stale));
+ handler->HandleAnotherChallenge(tok_stale));
std::string stale_false_challenge = default_challenge + ", stale=false";
HttpAuthChallengeTokenizer tok_stale_false(stale_false_challenge.begin(),
stale_false_challenge.end());
EXPECT_EQ(HttpAuth::AUTHORIZATION_RESULT_REJECT,
- handler->HandleAnotherChallenge(&tok_stale_false));
+ handler->HandleAnotherChallenge(tok_stale_false));
std::string realm_change_challenge =
"Digest realm=\"SomethingElse\", nonce=\"nonce-value2\"";
HttpAuthChallengeTokenizer tok_realm_change(realm_change_challenge.begin(),
realm_change_challenge.end());
EXPECT_EQ(HttpAuth::AUTHORIZATION_RESULT_DIFFERENT_REALM,
- handler->HandleAnotherChallenge(&tok_realm_change));
+ handler->HandleAnotherChallenge(tok_realm_change));
}
TEST(HttpAuthHandlerDigest, RespondToServerChallenge) {
« no previous file with comments | « net/http/http_auth_handler_digest.cc ('k') | net/http/http_auth_handler_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698