| Index: net/socket/socket_test_util.h
|
| diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
|
| index 2bd0d23863a0c9df15ba6f00123996dfe63f7285..9ccc11384c1332a4c6da7305e3dee4a1a89af0d3 100644
|
| --- a/net/socket/socket_test_util.h
|
| +++ b/net/socket/socket_test_util.h
|
| @@ -694,14 +694,23 @@ class MockSOCKSClientSocketPool : public SOCKSClientSocketPool {
|
| };
|
|
|
| struct MockHttpAuthControllerData {
|
| - MockHttpAuthControllerData(std::string header) : auth_header(header) {}
|
| + MockHttpAuthControllerData(std::string header,
|
| + std::string expected_username,
|
| + std::string expected_password)
|
| + : auth_header(header),
|
| + username(expected_username),
|
| + password(expected_password) {}
|
|
|
| std::string auth_header;
|
| + std::string username;
|
| + std::string password;
|
| };
|
|
|
| class MockHttpAuthController : public HttpAuthController {
|
| public:
|
| MockHttpAuthController();
|
| + virtual ~MockHttpAuthController() {}
|
| +
|
| void SetMockAuthControllerData(struct MockHttpAuthControllerData* data,
|
| size_t data_length);
|
|
|
| @@ -715,13 +724,15 @@ class MockHttpAuthController : public HttpAuthController {
|
| bool do_not_send_server_auth,
|
| bool establishing_tunnel,
|
| const BoundNetLog& net_log);
|
| - virtual void ResetAuth(const std::wstring& username,
|
| - const std::wstring& password);
|
| + virtual void SetCredentials(const std::wstring& username,
|
| + const std::wstring& password);
|
| + void PrepareForAuthRestart();
|
| +
|
| virtual bool HaveAuthHandler() const;
|
| virtual bool HaveAuth() const;
|
| + virtual HttpAuth::Identity AuthIdentity();
|
|
|
| private:
|
| - virtual ~MockHttpAuthController() {}
|
| const struct MockHttpAuthControllerData& CurrentData() const {
|
| DCHECK(data_index_ < data_count_);
|
| return data_[data_index_];
|
| @@ -730,6 +741,7 @@ class MockHttpAuthController : public HttpAuthController {
|
| MockHttpAuthControllerData* data_;
|
| size_t data_index_;
|
| size_t data_count_;
|
| + size_t next_index_;
|
| };
|
|
|
| // Constants for a successful SOCKS v5 handshake.
|
|
|