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

Unified Diff: remoting/protocol/negotiating_authenticator_unittest.cc

Issue 15685008: Show a 'remember me' checkbox in the web-app when connecting to a host that supports pairing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 7 years, 7 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 | « remoting/protocol/authenticator.h ('k') | remoting/protocol/negotiating_client_authenticator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/negotiating_authenticator_unittest.cc
diff --git a/remoting/protocol/negotiating_authenticator_unittest.cc b/remoting/protocol/negotiating_authenticator_unittest.cc
index c02d0b073255d9eb308e27f453eaad4d0ade8c7f..0c95f6b6cc9a4801a35da9ea82f8a7e0614c810f 100644
--- a/remoting/protocol/negotiating_authenticator_unittest.cc
+++ b/remoting/protocol/negotiating_authenticator_unittest.cc
@@ -69,10 +69,13 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
methods.push_back(AuthenticationMethod::Spake2(
AuthenticationMethod::NONE));
}
+ bool pairing_expected = pairing_registry != NULL;
+ FetchSecretCallback fetch_secret_callback = base::Bind(
+ &NegotiatingAuthenticatorTest::FetchSecret,
+ client_interactive_pin, pairing_expected);
client_as_negotiating_authenticator_ = new NegotiatingClientAuthenticator(
client_id, client_paired_secret,
- kTestHostId, base::Bind(&NegotiatingAuthenticatorTest::FetchSecret,
- client_interactive_pin),
+ kTestHostId, fetch_secret_callback,
scoped_ptr<ThirdPartyClientAuthenticator::TokenFetcher>(), methods);
client_.reset(client_as_negotiating_authenticator_);
}
@@ -93,8 +96,11 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
static void FetchSecret(
const std::string& client_secret,
+ bool pairing_supported,
+ bool pairing_expected,
const protocol::SecretFetchedCallback& secret_fetched_callback) {
secret_fetched_callback.Run(client_secret);
+ ASSERT_EQ(pairing_supported, pairing_expected);
}
void VerifyRejected(Authenticator::RejectionReason reason) {
« no previous file with comments | « remoting/protocol/authenticator.h ('k') | remoting/protocol/negotiating_client_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698