| 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/channel_multiplexer.h" | 5 #include "remoting/protocol/channel_multiplexer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 host_mux_.reset(); | 63 host_mux_.reset(); |
| 64 client_mux_.reset(); | 64 client_mux_.reset(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void DeleteAfterSessionFail() { | 67 void DeleteAfterSessionFail() { |
| 68 host_mux_->CancelChannelCreation(kTestChannelName2); | 68 host_mux_->CancelChannelCreation(kTestChannelName2); |
| 69 DeleteAll(); | 69 DeleteAll(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 virtual void SetUp() OVERRIDE { | 73 virtual void SetUp() override { |
| 74 // Create pair of multiplexers and connect them to each other. | 74 // Create pair of multiplexers and connect them to each other. |
| 75 host_mux_.reset(new ChannelMultiplexer( | 75 host_mux_.reset(new ChannelMultiplexer( |
| 76 host_session_.GetTransportChannelFactory(), kMuxChannelName)); | 76 host_session_.GetTransportChannelFactory(), kMuxChannelName)); |
| 77 client_mux_.reset(new ChannelMultiplexer( | 77 client_mux_.reset(new ChannelMultiplexer( |
| 78 client_session_.GetTransportChannelFactory(), kMuxChannelName)); | 78 client_session_.GetTransportChannelFactory(), kMuxChannelName)); |
| 79 } | 79 } |
| 80 | 80 |
| 81 // Connect sockets to each other. Must be called after we've created at least | 81 // Connect sockets to each other. Must be called after we've created at least |
| 82 // one channel with each multiplexer. | 82 // one channel with each multiplexer. |
| 83 void ConnectSockets() { | 83 void ConnectSockets() { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 .WillOnce(InvokeWithoutArgs( | 368 .WillOnce(InvokeWithoutArgs( |
| 369 this, &ChannelMultiplexerTest::DeleteAfterSessionFail)); | 369 this, &ChannelMultiplexerTest::DeleteAfterSessionFail)); |
| 370 EXPECT_CALL(cb2, OnConnectedPtr(_)) | 370 EXPECT_CALL(cb2, OnConnectedPtr(_)) |
| 371 .Times(0); | 371 .Times(0); |
| 372 | 372 |
| 373 base::RunLoop().RunUntilIdle(); | 373 base::RunLoop().RunUntilIdle(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace protocol | 376 } // namespace protocol |
| 377 } // namespace remoting | 377 } // namespace remoting |
| OLD | NEW |