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

Unified Diff: remoting/protocol/third_party_authenticator_unittest.cc

Issue 1770923002: Remove dependency on V2Authenticator from ThirdParty and pairing authenticators. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: remoting/protocol/third_party_authenticator_unittest.cc
diff --git a/remoting/protocol/third_party_authenticator_unittest.cc b/remoting/protocol/third_party_authenticator_unittest.cc
index 441c56a1b4f8a6adac9b16466a082058b0edbcb5..7b9c46dd79cddbc530d1bf60dfe8299bbab8e32d 100644
--- a/remoting/protocol/third_party_authenticator_unittest.cc
+++ b/remoting/protocol/third_party_authenticator_unittest.cc
@@ -17,6 +17,7 @@
#include "remoting/protocol/third_party_client_authenticator.h"
#include "remoting/protocol/third_party_host_authenticator.h"
#include "remoting/protocol/token_validator.h"
+#include "remoting/protocol/v2_authenticator.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
@@ -100,14 +101,14 @@ class ThirdPartyAuthenticatorTest : public AuthenticatorTestBase {
protected:
void InitAuthenticators() {
- scoped_ptr<TokenValidator> token_validator(new FakeTokenValidator());
- token_validator_ = static_cast<FakeTokenValidator*>(token_validator.get());
+ token_validator_ = new FakeTokenValidator();
host_.reset(new ThirdPartyHostAuthenticator(
- host_cert_, key_pair_, std::move(token_validator)));
- scoped_ptr<ThirdPartyClientAuthenticator::TokenFetcher>
- token_fetcher(new FakeTokenFetcher());
- token_fetcher_ = static_cast<FakeTokenFetcher*>(token_fetcher.get());
- client_.reset(new ThirdPartyClientAuthenticator(std::move(token_fetcher)));
+ base::Bind(&V2Authenticator::CreateForHost, host_cert_, key_pair_),
+ make_scoped_ptr(token_validator_)));
+ token_fetcher_ = new FakeTokenFetcher();
+ client_.reset(new ThirdPartyClientAuthenticator(
+ base::Bind(&V2Authenticator::CreateForClient),
+ make_scoped_ptr(token_fetcher_)));
}
FakeTokenFetcher* token_fetcher_;

Powered by Google App Engine
This is Rietveld 408576698