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

Side by Side Diff: remoting/protocol/authenticator_test_base.h

Issue 12316083: Move HostKeyPair into protocol::KeyPair. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 9 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 unified diff | Download patch
« no previous file with comments | « remoting/host/test_key_pair.h ('k') | remoting/protocol/authenticator_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/message_loop.h" 11 #include "base/message_loop.h"
11 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
12 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 namespace crypto {
16 class RSAPrivateKey;
17 } // namespace crypto
18
19 namespace net { 16 namespace net {
20 class StreamSocket; 17 class StreamSocket;
21 } // namespace net 18 } // namespace net
22 19
23 namespace remoting { 20 namespace remoting {
21
22 class RsaKeyPair;
23
24 namespace protocol { 24 namespace protocol {
25 25
26 class Authenticator; 26 class Authenticator;
27 class ChannelAuthenticator; 27 class ChannelAuthenticator;
28 class FakeSocket; 28 class FakeSocket;
29 29
30 class AuthenticatorTestBase : public testing::Test { 30 class AuthenticatorTestBase : public testing::Test {
31 public: 31 public:
32 AuthenticatorTestBase(); 32 AuthenticatorTestBase();
33 virtual ~AuthenticatorTestBase(); 33 virtual ~AuthenticatorTestBase();
(...skipping 12 matching lines...) Expand all
46 void RunAuthExchange(); 46 void RunAuthExchange();
47 void RunChannelAuth(bool expected_fail); 47 void RunChannelAuth(bool expected_fail);
48 48
49 void OnHostConnected(net::Error error, 49 void OnHostConnected(net::Error error,
50 scoped_ptr<net::StreamSocket> socket); 50 scoped_ptr<net::StreamSocket> socket);
51 void OnClientConnected(net::Error error, 51 void OnClientConnected(net::Error error,
52 scoped_ptr<net::StreamSocket> socket); 52 scoped_ptr<net::StreamSocket> socket);
53 53
54 MessageLoop message_loop_; 54 MessageLoop message_loop_;
55 55
56 scoped_ptr<crypto::RSAPrivateKey> private_key_; 56 scoped_refptr<RsaKeyPair> key_pair_;
57 std::string host_cert_; 57 std::string host_cert_;
58 scoped_ptr<Authenticator> host_; 58 scoped_ptr<Authenticator> host_;
59 scoped_ptr<Authenticator> client_; 59 scoped_ptr<Authenticator> client_;
60 scoped_ptr<FakeSocket> client_fake_socket_; 60 scoped_ptr<FakeSocket> client_fake_socket_;
61 scoped_ptr<FakeSocket> host_fake_socket_; 61 scoped_ptr<FakeSocket> host_fake_socket_;
62 scoped_ptr<ChannelAuthenticator> client_auth_; 62 scoped_ptr<ChannelAuthenticator> client_auth_;
63 scoped_ptr<ChannelAuthenticator> host_auth_; 63 scoped_ptr<ChannelAuthenticator> host_auth_;
64 MockChannelDoneCallback client_callback_; 64 MockChannelDoneCallback client_callback_;
65 MockChannelDoneCallback host_callback_; 65 MockChannelDoneCallback host_callback_;
66 scoped_ptr<net::StreamSocket> client_socket_; 66 scoped_ptr<net::StreamSocket> client_socket_;
67 scoped_ptr<net::StreamSocket> host_socket_; 67 scoped_ptr<net::StreamSocket> host_socket_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(AuthenticatorTestBase); 69 DISALLOW_COPY_AND_ASSIGN(AuthenticatorTestBase);
70 }; 70 };
71 71
72 } // namespace protocol 72 } // namespace protocol
73 } // namespace remoting 73 } // namespace remoting
74 74
75 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ 75 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_
OLDNEW
« no previous file with comments | « remoting/host/test_key_pair.h ('k') | remoting/protocol/authenticator_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698