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

Unified Diff: net/http/http_auth_unittest.cc

Issue 1381493004: [net/http auth] Generalize HttpAuthHandlerMock. Base URL: https://chromium.googlesource.com/chromium/src.git@http-auth-scheme-properties
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_mock.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_unittest.cc
diff --git a/net/http/http_auth_unittest.cc b/net/http/http_auth_unittest.cc
index cebb3966bf9ecaec31918c6fc888fac43f79bb1e..d39d503c7e4201df3f3b88f1b1404d2b0d0f3624 100644
--- a/net/http/http_auth_unittest.cc
+++ b/net/http/http_auth_unittest.cc
@@ -29,14 +29,12 @@ namespace {
HttpAuthHandlerMock* CreateMockHandler(bool expect_multiple_challenges) {
HttpAuthHandlerMock* auth_handler = new HttpAuthHandlerMock();
auth_handler->set_expect_multiple_challenges(expect_multiple_challenges);
- std::string challenge_text = "Basic";
+ std::string challenge_text = "Mock";
HttpAuthChallengeTokenizer challenge(challenge_text.begin(),
- challenge_text.end());
+ challenge_text.end());
GURL origin("www.example.com");
- EXPECT_TRUE(auth_handler->InitFromChallenge(&challenge,
- HttpAuth::AUTH_SERVER,
- origin,
- BoundNetLog()));
+ EXPECT_TRUE(auth_handler->InitFromChallenge(&challenge, HttpAuth::AUTH_SERVER,
+ origin, BoundNetLog()));
return auth_handler;
}
@@ -54,12 +52,9 @@ HttpAuth::AuthorizationResult HandleChallengeResponse(
HttpAuthSchemeSet disabled_schemes;
scoped_refptr<HttpResponseHeaders> headers(
HeadersFromResponseText(headers_text));
- return HttpAuth::HandleChallengeResponse(
- mock_handler.get(),
- headers.get(),
- HttpAuth::AUTH_SERVER,
- disabled_schemes,
- challenge_used);
+ return HttpAuth::HandleChallengeResponse(mock_handler.get(), headers.get(),
+ HttpAuth::AUTH_SERVER,
+ disabled_schemes, challenge_used);
}
} // namespace
« no previous file with comments | « net/http/http_auth_handler_mock.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698