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

Unified Diff: net/http/http_auth_handler_negotiate_unittest.cc

Issue 1393693002: [net/http auth] Split HttpAuthHandler creation from initialization. Base URL: https://chromium.googlesource.com/chromium/src.git@rename-auth-handler-methods
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_negotiate.cc ('k') | net/http/http_auth_handler_ntlm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_negotiate_unittest.cc
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index f9950489e24d4efc05c5f0be64dcb9324f1600f8..c456e02ea905329b68f13536c22f8e07a9a98406 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -11,6 +11,7 @@
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/http/http_auth_challenge_tokenizer.h"
#include "net/http/http_request_info.h"
#include "net/http/mock_allow_url_security_manager.h"
#if defined(OS_ANDROID)
@@ -204,12 +205,15 @@ class HttpAuthHandlerNegotiateTest : public PlatformTest {
// scoped_ptr<HttpAuthHandlerNegotiate>*. This needs to do the cast
// after creating the handler, and make sure that generic_handler
// no longer holds on to the HttpAuthHandlerNegotiate object.
- scoped_ptr<HttpAuthHandler> generic_handler;
- int rv = factory_->CreateAuthHandlerFromString("Negotiate",
- HttpAuth::AUTH_SERVER,
- gurl,
- BoundNetLog(),
- &generic_handler);
+ std::string challenge = "Negotiate";
+ HttpAuthChallengeTokenizer tokenizer(challenge.begin(), challenge.end());
+
+ scoped_ptr<HttpAuthHandler> generic_handler =
+ factory_->CreateAuthHandlerForScheme(tokenizer.NormalizedScheme());
+ if (!generic_handler)
+ return ERR_UNSUPPORTED_AUTH_SCHEME;
+ int rv = generic_handler->HandleInitialChallenge(
+ tokenizer, HttpAuth::AUTH_SERVER, gurl, BoundNetLog());
if (rv != OK)
return rv;
HttpAuthHandlerNegotiate* negotiate_handler =
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | net/http/http_auth_handler_ntlm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698