| 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 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ | 5 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ |
| 6 #define REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ | 6 #define REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 class MockChannelDoneCallback { | 36 class MockChannelDoneCallback { |
| 37 public: | 37 public: |
| 38 MockChannelDoneCallback(); | 38 MockChannelDoneCallback(); |
| 39 ~MockChannelDoneCallback(); | 39 ~MockChannelDoneCallback(); |
| 40 MOCK_METHOD1(OnDone, void(net::Error error)); | 40 MOCK_METHOD1(OnDone, void(net::Error error)); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 static void ContinueAuthExchangeWith(Authenticator* sender, | 43 static void ContinueAuthExchangeWith(Authenticator* sender, |
| 44 Authenticator* receiver); | 44 Authenticator* receiver, |
| 45 bool sender_started, |
| 46 bool receiver_srated); |
| 45 virtual void SetUp() OVERRIDE; | 47 virtual void SetUp() OVERRIDE; |
| 46 void RunAuthExchange(); | 48 void RunAuthExchange(); |
| 47 void RunHostInitiatedAuthExchange(); | 49 void RunHostInitiatedAuthExchange(); |
| 48 void RunChannelAuth(bool expected_fail); | 50 void RunChannelAuth(bool expected_fail); |
| 49 | 51 |
| 50 void OnHostConnected(net::Error error, | 52 void OnHostConnected(net::Error error, |
| 51 scoped_ptr<net::StreamSocket> socket); | 53 scoped_ptr<net::StreamSocket> socket); |
| 52 void OnClientConnected(net::Error error, | 54 void OnClientConnected(net::Error error, |
| 53 scoped_ptr<net::StreamSocket> socket); | 55 scoped_ptr<net::StreamSocket> socket); |
| 54 | 56 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 68 scoped_ptr<net::StreamSocket> client_socket_; | 70 scoped_ptr<net::StreamSocket> client_socket_; |
| 69 scoped_ptr<net::StreamSocket> host_socket_; | 71 scoped_ptr<net::StreamSocket> host_socket_; |
| 70 | 72 |
| 71 DISALLOW_COPY_AND_ASSIGN(AuthenticatorTestBase); | 73 DISALLOW_COPY_AND_ASSIGN(AuthenticatorTestBase); |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 } // namespace protocol | 76 } // namespace protocol |
| 75 } // namespace remoting | 77 } // namespace remoting |
| 76 | 78 |
| 77 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ | 79 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ |
| OLD | NEW |