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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 host_session_.fake_channel_factory().set_fail_create(true); | 356 host_session_.fake_channel_factory().set_fail_create(true); |
357 | 357 |
358 MockConnectCallback cb1; | 358 MockConnectCallback cb1; |
359 MockConnectCallback cb2; | 359 MockConnectCallback cb2; |
360 | 360 |
361 host_mux_->CreateChannel(kTestChannelName, base::Bind( | 361 host_mux_->CreateChannel(kTestChannelName, base::Bind( |
362 &MockConnectCallback::OnConnected, base::Unretained(&cb1))); | 362 &MockConnectCallback::OnConnected, base::Unretained(&cb1))); |
363 host_mux_->CreateChannel(kTestChannelName2, base::Bind( | 363 host_mux_->CreateChannel(kTestChannelName2, base::Bind( |
364 &MockConnectCallback::OnConnected, base::Unretained(&cb2))); | 364 &MockConnectCallback::OnConnected, base::Unretained(&cb2))); |
365 | 365 |
366 EXPECT_CALL(cb1, OnConnectedPtr(NULL)) | 366 EXPECT_CALL(cb1, OnConnectedPtr(nullptr)) |
367 .Times(AtMost(1)) | 367 .Times(AtMost(1)) |
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 |