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

Unified Diff: remoting/protocol/negotiating_authenticator_unittest.cc

Issue 21128006: Refactored PairingRegistry::Delegate such that it can retrieve/modify for a single client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 b746432eb6a0c6b065af44535fcfa61e2e2445b1..1e493a6470c1f72da239aa311d27cf2667bf4d5c 100644
--- a/remoting/protocol/negotiating_authenticator_unittest.cc
+++ b/remoting/protocol/negotiating_authenticator_unittest.cc
@@ -91,7 +91,7 @@ class NegotiatingAuthenticatorTest : public AuthenticatorTestBase {
PairingRegistry::Pairing pairing(
base::Time(), kTestClientName, kTestClientId, kTestPairedSecret);
pairing_registry_->AddPairing(pairing);
- mock_delegate_->RunCallback();
+ mock_delegate_->DrainCallbacks();
}
}
@@ -217,7 +217,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingRevokedPinOkay) {
kTestClientId, kTestPairedSecret, kTestPin, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
ASSERT_NO_FATAL_FAILURE(RunAuthExchange());
- mock_delegate_->RunCallback();
+ mock_delegate_->DrainCallbacks();
VerifyAccepted(AuthenticationMethod::Spake2Pair());
}
@@ -227,7 +227,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingRevokedPinBad) {
kTestClientId, kTestPairedSecret, kTestPinBad, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
ASSERT_NO_FATAL_FAILURE(RunAuthExchange());
- mock_delegate_->RunCallback();
+ mock_delegate_->DrainCallbacks();
VerifyRejected(Authenticator::INVALID_CREDENTIALS);
}
@@ -237,7 +237,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingSucceeded) {
kTestClientId, kTestPairedSecret, kTestPinBad, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
ASSERT_NO_FATAL_FAILURE(RunAuthExchange());
- mock_delegate_->RunCallback();
+ mock_delegate_->DrainCallbacks();
VerifyAccepted(AuthenticationMethod::Spake2Pair());
}
@@ -247,7 +247,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingSucceededInvalidSecretButPinOkay) {
kTestClientId, kTestPairedSecretBad, kTestPin, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
ASSERT_NO_FATAL_FAILURE(RunAuthExchange());
- mock_delegate_->RunCallback();
+ mock_delegate_->DrainCallbacks();
VerifyAccepted(AuthenticationMethod::Spake2Pair());
}
@@ -257,7 +257,7 @@ TEST_F(NegotiatingAuthenticatorTest, PairingFailedInvalidSecretAndPin) {
kTestClientId, kTestPairedSecretBad, kTestPinBad, kTestPin,
AuthenticationMethod::HMAC_SHA256, false));
ASSERT_NO_FATAL_FAILURE(RunAuthExchange());
- mock_delegate_->RunCallback();
+ mock_delegate_->DrainCallbacks();
VerifyRejected(Authenticator::INVALID_CREDENTIALS);
}

Powered by Google App Engine
This is Rietveld 408576698