| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bind_helpers.h" |
| 6 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 7 #include "base/time.h" | 8 #include "base/time.h" |
| 8 #include "net/socket/socket.h" | 9 #include "net/socket/socket.h" |
| 9 #include "net/socket/stream_socket.h" | 10 #include "net/socket/stream_socket.h" |
| 10 #include "remoting/base/constants.h" | 11 #include "remoting/base/constants.h" |
| 11 #include "remoting/protocol/authenticator.h" | 12 #include "remoting/protocol/authenticator.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/fake_authenticator.h" | 15 #include "remoting/protocol/fake_authenticator.h" |
| 15 #include "remoting/protocol/jingle_session.h" | 16 #include "remoting/protocol/jingle_session.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 QuitThreadOnCounter(&counter))); | 256 QuitThreadOnCounter(&counter))); |
| 256 message_loop_.Run(); | 257 message_loop_.Run(); |
| 257 | 258 |
| 258 ASSERT_TRUE(client_socket != NULL); | 259 ASSERT_TRUE(client_socket != NULL); |
| 259 ASSERT_TRUE(host_socket != NULL); | 260 ASSERT_TRUE(host_socket != NULL); |
| 260 | 261 |
| 261 client_socket_.reset(client_socket); | 262 client_socket_.reset(client_socket); |
| 262 host_socket_.reset(host_socket); | 263 host_socket_.reset(host_socket); |
| 263 } | 264 } |
| 264 | 265 |
| 265 static void DoNothing() { } | |
| 266 | |
| 267 JingleThreadMessageLoop message_loop_; | 266 JingleThreadMessageLoop message_loop_; |
| 268 | 267 |
| 269 scoped_ptr<FakeSignalStrategy> host_signal_strategy_; | 268 scoped_ptr<FakeSignalStrategy> host_signal_strategy_; |
| 270 scoped_ptr<FakeSignalStrategy> client_signal_strategy_; | 269 scoped_ptr<FakeSignalStrategy> client_signal_strategy_; |
| 271 | 270 |
| 272 scoped_ptr<JingleSessionManager> host_server_; | 271 scoped_ptr<JingleSessionManager> host_server_; |
| 273 MockSessionManagerListener host_server_listener_; | 272 MockSessionManagerListener host_server_listener_; |
| 274 scoped_ptr<JingleSessionManager> client_server_; | 273 scoped_ptr<JingleSessionManager> client_server_; |
| 275 MockSessionManagerListener client_server_listener_; | 274 MockSessionManagerListener client_server_listener_; |
| 276 | 275 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 | 435 |
| 437 DatagramConnectionTester tester( | 436 DatagramConnectionTester tester( |
| 438 client_socket, host_socket, kMessageSize, kMessages, kUdpWriteDelayMs); | 437 client_socket, host_socket, kMessageSize, kMessages, kUdpWriteDelayMs); |
| 439 tester.Start(); | 438 tester.Start(); |
| 440 message_loop_.Run(); | 439 message_loop_.Run(); |
| 441 tester.CheckResults(); | 440 tester.CheckResults(); |
| 442 } | 441 } |
| 443 | 442 |
| 444 } // namespace protocol | 443 } // namespace protocol |
| 445 } // namespace remoting | 444 } // namespace remoting |
| OLD | NEW |