Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/run_loop.h" | |
| 8 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 9 #include "remoting/base/rsa_key_pair.h" | 10 #include "remoting/base/rsa_key_pair.h" |
| 10 #include "remoting/protocol/auth_util.h" | 11 #include "remoting/protocol/auth_util.h" |
| 11 #include "remoting/protocol/authenticator_test_base.h" | 12 #include "remoting/protocol/authenticator_test_base.h" |
| 12 #include "remoting/protocol/channel_authenticator.h" | 13 #include "remoting/protocol/channel_authenticator.h" |
| 13 #include "remoting/protocol/connection_tester.h" | 14 #include "remoting/protocol/connection_tester.h" |
| 14 #include "remoting/protocol/negotiating_authenticator_base.h" | 15 #include "remoting/protocol/negotiating_authenticator_base.h" |
| 15 #include "remoting/protocol/negotiating_client_authenticator.h" | 16 #include "remoting/protocol/negotiating_client_authenticator.h" |
| 16 #include "remoting/protocol/negotiating_host_authenticator.h" | 17 #include "remoting/protocol/negotiating_host_authenticator.h" |
| 17 #include "remoting/protocol/pairing_registry.h" | 18 #include "remoting/protocol/pairing_registry.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 host_auth_ = host_->CreateChannelAuthenticator(); | 135 host_auth_ = host_->CreateChannelAuthenticator(); |
| 135 RunChannelAuth(false); | 136 RunChannelAuth(false); |
| 136 | 137 |
| 137 EXPECT_TRUE(client_socket_.get() != nullptr); | 138 EXPECT_TRUE(client_socket_.get() != nullptr); |
| 138 EXPECT_TRUE(host_socket_.get() != nullptr); | 139 EXPECT_TRUE(host_socket_.get() != nullptr); |
| 139 | 140 |
| 140 StreamConnectionTester tester(host_socket_.get(), client_socket_.get(), | 141 StreamConnectionTester tester(host_socket_.get(), client_socket_.get(), |
| 141 kMessageSize, kMessages); | 142 kMessageSize, kMessages); |
| 142 | 143 |
| 143 tester.Start(); | 144 tester.Start(); |
| 144 message_loop_.Run(); | 145 base::RunLoop().Run(); |
|
gab
2016/06/30 20:28:18
No longer using the member, maybe AuthenticatorTes
fdoray
2016/07/04 13:59:46
Done.
| |
| 145 tester.CheckResults(); | 146 tester.CheckResults(); |
| 146 } | 147 } |
| 147 | 148 |
| 148 NegotiatingAuthenticatorBase::Method current_method() { | 149 NegotiatingAuthenticatorBase::Method current_method() { |
| 149 return client_as_negotiating_authenticator_->current_method_; | 150 return client_as_negotiating_authenticator_->current_method_; |
| 150 } | 151 } |
| 151 | 152 |
| 152 // Use a bare pointer because the storage is managed by the base class. | 153 // Use a bare pointer because the storage is managed by the base class. |
| 153 NegotiatingHostAuthenticator* host_as_negotiating_authenticator_; | 154 NegotiatingHostAuthenticator* host_as_negotiating_authenticator_; |
| 154 NegotiatingClientAuthenticator* client_as_negotiating_authenticator_; | 155 NegotiatingClientAuthenticator* client_as_negotiating_authenticator_; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 TEST_P(NegotiatingPairingAuthenticatorTest, PairingFailedInvalidSecretAndPin) { | 310 TEST_P(NegotiatingPairingAuthenticatorTest, PairingFailedInvalidSecretAndPin) { |
| 310 CreatePairingRegistry(true); | 311 CreatePairingRegistry(true); |
| 311 ASSERT_NO_FATAL_FAILURE(InitAuthenticators( | 312 ASSERT_NO_FATAL_FAILURE(InitAuthenticators( |
| 312 kTestClientId, kTestPairedSecretBad, kTestPinBad, kTestPin)); | 313 kTestClientId, kTestPairedSecretBad, kTestPinBad, kTestPin)); |
| 313 ASSERT_NO_FATAL_FAILURE(RunAuthExchange()); | 314 ASSERT_NO_FATAL_FAILURE(RunAuthExchange()); |
| 314 VerifyRejected(Authenticator::INVALID_CREDENTIALS); | 315 VerifyRejected(Authenticator::INVALID_CREDENTIALS); |
| 315 } | 316 } |
| 316 | 317 |
| 317 } // namespace protocol | 318 } // namespace protocol |
| 318 } // namespace remoting | 319 } // namespace remoting |
| OLD | NEW |