| Index: remoting/protocol/negotiating_authenticator_unittest.cc
|
| diff --git a/remoting/protocol/negotiating_authenticator_unittest.cc b/remoting/protocol/negotiating_authenticator_unittest.cc
|
| index 213502247d32e46527664e61a4853a8fb174b4f2..ef1b3cc0428902c09b254c43b5aaa248970704e1 100644
|
| --- a/remoting/protocol/negotiating_authenticator_unittest.cc
|
| +++ b/remoting/protocol/negotiating_authenticator_unittest.cc
|
| @@ -41,6 +41,18 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
|
| }
|
|
|
| protected:
|
| + class MockTokenFetcher
|
| + : public protocol::ThirdPartyAuthenticator::TokenFetcher {
|
| + public:
|
| + MOCK_METHOD4(FetchThirdPartyToken, void(
|
| + const std::string& token_url,
|
| + const std::string& host_public_key,
|
| + const std::string& scope,
|
| + const base::Callback<void(
|
| + const std::string& token,
|
| + const std::string& shared_secret)>& on_token_fetched));
|
| + };
|
| +
|
| void InitAuthenticators(
|
| const std::string& client_secret,
|
| const std::string& host_secret,
|
| @@ -48,7 +60,7 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
|
| bool client_hmac_only) {
|
| std::string host_secret_hash = AuthenticationMethod::ApplyHashFunction(
|
| hash_function, kTestHostId, host_secret);
|
| - host_ = NegotiatingAuthenticator::CreateForHost(
|
| + host_ = NegotiatingAuthenticator::CreateForHostSharedSecret(
|
| host_cert_, key_pair_->Copy(), host_secret_hash, hash_function);
|
|
|
| std::vector<AuthenticationMethod> methods;
|
| @@ -59,7 +71,8 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
|
| AuthenticationMethod::NONE));
|
| }
|
| client_ = NegotiatingAuthenticator::CreateForClient(
|
| - kTestHostId, client_secret, methods);
|
| + kTestHostId, client_secret, host_public_key_, methods,
|
| + &mock_token_fetcher_);
|
| }
|
|
|
| void VerifyRejected(Authenticator::RejectionReason reason) {
|
| @@ -69,6 +82,7 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
|
| (host_->rejection_reason() == reason)));
|
| }
|
|
|
| + MockTokenFetcher mock_token_fetcher_;
|
| DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorTest);
|
| };
|
|
|
|
|