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

Unified Diff: net/http/http_auth_handler_negotiate_unittest.cc

Issue 1391053002: [net/http auth] Make HttpAuthHandler challenge handling asynchronous. Base URL: https://chromium.googlesource.com/chromium/src.git@auth-handler-init-split
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 c456e02ea905329b68f13536c22f8e07a9a98406..51e94bc7c5875b292cfa77352aebb1eeaad510d1 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -13,6 +13,7 @@
#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/http_response_info.h"
#include "net/http/mock_allow_url_security_manager.h"
#if defined(OS_ANDROID)
#include "net/android/dummy_spnego_authenticator.h"
@@ -191,10 +192,11 @@ class HttpAuthHandlerNegotiateTest : public PlatformTest {
#endif // defined(OS_POSIX)
- int CreateHandler(bool disable_cname_lookup, bool use_port,
- bool synchronous_resolve_mode,
- const std::string& url_string,
- scoped_ptr<HttpAuthHandlerNegotiate>* handler) {
+ int CreateHandler(bool disable_cname_lookup,
+ bool use_port,
+ bool synchronous_resolve_mode,
+ const std::string& url_string,
+ scoped_ptr<HttpAuthHandlerNegotiate>* handler) {
factory_->set_disable_cname_lookup(disable_cname_lookup);
factory_->set_use_port(use_port);
resolver_->set_synchronous_mode(synchronous_resolve_mode);
@@ -212,8 +214,12 @@ class HttpAuthHandlerNegotiateTest : public PlatformTest {
factory_->CreateAuthHandlerForScheme(tokenizer.NormalizedScheme());
if (!generic_handler)
return ERR_UNSUPPORTED_AUTH_SCHEME;
+ HttpResponseInfo fake_response_info;
+ TestCompletionCallback callback;
int rv = generic_handler->HandleInitialChallenge(
- tokenizer, HttpAuth::AUTH_SERVER, gurl, BoundNetLog());
+ tokenizer, fake_response_info, HttpAuth::AUTH_SERVER, gurl,
+ BoundNetLog(), callback.callback());
+ rv = callback.GetResult(rv);
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