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 "remoting/protocol/authenticator_test_base.h" | 5 #include "remoting/protocol/authenticator_test_base.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
11 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/base/test_data_directory.h" | 13 #include "net/base/test_data_directory.h" |
14 #include "remoting/base/rsa_key_pair.h" | 14 #include "remoting/base/rsa_key_pair.h" |
15 #include "remoting/protocol/authenticator.h" | 15 #include "remoting/protocol/authenticator.h" |
16 #include "remoting/protocol/channel_authenticator.h" | 16 #include "remoting/protocol/channel_authenticator.h" |
17 #include "remoting/protocol/fake_stream_socket.h" | 17 #include "remoting/protocol/fake_stream_socket.h" |
| 18 #include "remoting/protocol/p2p_stream_socket.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 20 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
20 | 21 |
21 using testing::_; | 22 using testing::_; |
22 using testing::SaveArg; | 23 using testing::SaveArg; |
23 | 24 |
24 namespace remoting { | 25 namespace remoting { |
25 namespace protocol { | 26 namespace protocol { |
26 | 27 |
27 namespace { | 28 namespace { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 testing::Mock::VerifyAndClearExpectations(&host_callback_); | 152 testing::Mock::VerifyAndClearExpectations(&host_callback_); |
152 | 153 |
153 if (!expected_fail) { | 154 if (!expected_fail) { |
154 ASSERT_TRUE(client_socket_.get() != nullptr); | 155 ASSERT_TRUE(client_socket_.get() != nullptr); |
155 ASSERT_TRUE(host_socket_.get() != nullptr); | 156 ASSERT_TRUE(host_socket_.get() != nullptr); |
156 } | 157 } |
157 } | 158 } |
158 | 159 |
159 void AuthenticatorTestBase::OnHostConnected( | 160 void AuthenticatorTestBase::OnHostConnected( |
160 int error, | 161 int error, |
161 scoped_ptr<net::StreamSocket> socket) { | 162 scoped_ptr<P2PStreamSocket> socket) { |
162 host_callback_.OnDone(error); | 163 host_callback_.OnDone(error); |
163 host_socket_ = socket.Pass(); | 164 host_socket_ = socket.Pass(); |
164 } | 165 } |
165 | 166 |
166 void AuthenticatorTestBase::OnClientConnected( | 167 void AuthenticatorTestBase::OnClientConnected( |
167 int error, | 168 int error, |
168 scoped_ptr<net::StreamSocket> socket) { | 169 scoped_ptr<P2PStreamSocket> socket) { |
169 client_callback_.OnDone(error); | 170 client_callback_.OnDone(error); |
170 client_socket_ = socket.Pass(); | 171 client_socket_ = socket.Pass(); |
171 } | 172 } |
172 | 173 |
173 } // namespace protocol | 174 } // namespace protocol |
174 } // namespace remoting | 175 } // namespace remoting |
OLD | NEW |