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

Unified Diff: net/http/http_auth_handler_mock.h

Issue 1157333005: [net/http auth] Use strings to identify authentication schemes. Base URL: https://chromium.googlesource.com/chromium/src.git@master
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_factory_unittest.cc ('k') | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_mock.h
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index 32b416d2fba7424440accfdef5c9fb44eb33120f..72653b010b6b76138e7168ec0dcfb6358045477c 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -37,6 +37,8 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target);
+ bool HaveAuthHandlers(HttpAuth::Target) const;
+
void set_do_init_from_challenge(bool do_init_from_challenge) {
do_init_from_challenge_ = do_init_from_challenge;
}
@@ -69,14 +71,18 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
void SetGenerateExpectation(bool async, int rv);
- void set_connection_based(bool connection_based) {
- connection_based_ = connection_based;
+ void set_expect_multiple_challenges(bool expect_multiple_challenges) {
+ expect_multiple_challenges_ = expect_multiple_challenges;
}
void set_allows_default_credentials(bool allows_default_credentials) {
allows_default_credentials_ = allows_default_credentials;
}
+ bool expect_multiple_challenges() const {
+ return expect_multiple_challenges_;
+ }
+
void set_allows_explicit_credentials(bool allows_explicit_credentials) {
allows_explicit_credentials_ = allows_explicit_credentials;
}
@@ -105,15 +111,15 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
void OnGenerateAuthToken();
- Resolve resolve_;
+ Resolve resolve_ = RESOLVE_INIT;
CompletionCallback callback_;
- bool generate_async_;
+ bool generate_async_ = false;
int generate_rv_;
- std::string* auth_token_;
- bool first_round_;
- bool connection_based_;
- bool allows_default_credentials_;
- bool allows_explicit_credentials_;
+ std::string* auth_token_ = nullptr;
+ bool first_round_ = true;
+ bool allows_default_credentials_ = false;
+ bool allows_explicit_credentials_ = true;
+ bool expect_multiple_challenges_ = false;
GURL request_url_;
base::WeakPtrFactory<HttpAuthHandlerMock> weak_factory_;
};
« no previous file with comments | « net/http/http_auth_handler_factory_unittest.cc ('k') | net/http/http_auth_handler_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698