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

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: Improved PIN dialog layout. 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
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..8b661dfcf2f885de47cbe2600878a67f73d3a1cc 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,
- const protocol::SecretFetchedCallback& secret_fetched_callback) {
+ bool pairing_expected,
+ const protocol::SecretFetchedCallback& secret_fetched_callback,
+ bool pairing_supported) {
secret_fetched_callback.Run(client_secret);
+ ASSERT_EQ(pairing_supported, pairing_expected);
}
void VerifyRejected(Authenticator::RejectionReason reason) {

Powered by Google App Engine
This is Rietveld 408576698