| 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 049b880354038f0fe46e73727b5ea700a947edd9..6a1e58e8f2eaa80f6376eef6aec61de7bbcd3e7c 100644
|
| --- a/net/http/http_auth_handler_mock.h
|
| +++ b/net/http/http_auth_handler_mock.h
|
| @@ -6,6 +6,7 @@
|
| #define NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_
|
|
|
| #include <memory>
|
| +#include <ostream>
|
| #include <string>
|
| #include <vector>
|
|
|
| @@ -21,6 +22,14 @@ class HostResolver;
|
| // MockAuthHandler is used in tests to reliably trigger edge cases.
|
| class HttpAuthHandlerMock : public HttpAuthHandler {
|
| public:
|
| + enum class State {
|
| + WAIT_FOR_INIT,
|
| + WAIT_FOR_CHALLENGE,
|
| + WAIT_FOR_GENERATE_AUTH_TOKEN,
|
| + TOKEN_PENDING,
|
| + DONE
|
| + };
|
| +
|
| enum Resolve {
|
| RESOLVE_INIT,
|
| RESOLVE_SKIP,
|
| @@ -88,6 +97,8 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
|
| return request_url_;
|
| }
|
|
|
| + State state() const { return state_; }
|
| +
|
| // HttpAuthHandler:
|
| HttpAuth::AuthorizationResult HandleAnotherChallenge(
|
| HttpAuthChallengeTokenizer* challenge) override;
|
| @@ -109,6 +120,7 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
|
|
|
| void OnGenerateAuthToken();
|
|
|
| + State state_;
|
| Resolve resolve_;
|
| CompletionCallback callback_;
|
| bool generate_async_;
|
| @@ -122,6 +134,8 @@ class HttpAuthHandlerMock : public HttpAuthHandler {
|
| base::WeakPtrFactory<HttpAuthHandlerMock> weak_factory_;
|
| };
|
|
|
| +void PrintTo(const HttpAuthHandlerMock::State& state, ::std::ostream* os);
|
| +
|
| } // namespace net
|
|
|
| #endif // NET_HTTP_HTTP_AUTH_HANDLER_MOCK_H_
|
|
|