| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 const int kMessageSize = 1024; | 28 const int kMessageSize = 1024; |
| 29 const int kMessages = 100; | 29 const int kMessages = 100; |
| 30 const char kMuxChannelName[] = "mux"; | 30 const char kMuxChannelName[] = "mux"; |
| 31 | 31 |
| 32 const char kTestChannelName[] = "test"; | 32 const char kTestChannelName[] = "test"; |
| 33 const char kTestChannelName2[] = "test2"; | 33 const char kTestChannelName2[] = "test2"; |
| 34 | 34 |
| 35 | 35 |
| 36 void QuitCurrentThread() { | 36 void QuitCurrentThread() { |
| 37 base::MessageLoop::current()->PostTask(FROM_HERE, | 37 base::MessageLoop::current()->PostTask( |
| 38 base::MessageLoop::QuitClosure()); | 38 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 class MockSocketCallback { | 41 class MockSocketCallback { |
| 42 public: | 42 public: |
| 43 MOCK_METHOD1(OnDone, void(int result)); | 43 MOCK_METHOD1(OnDone, void(int result)); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 class MockConnectCallback { | 46 class MockConnectCallback { |
| 47 public: | 47 public: |
| 48 MOCK_METHOD1(OnConnectedPtr, void(P2PStreamSocket* socket)); | 48 MOCK_METHOD1(OnConnectedPtr, void(P2PStreamSocket* socket)); |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 .WillOnce(InvokeWithoutArgs( | 365 .WillOnce(InvokeWithoutArgs( |
| 366 this, &ChannelMultiplexerTest::DeleteAfterSessionFail)); | 366 this, &ChannelMultiplexerTest::DeleteAfterSessionFail)); |
| 367 EXPECT_CALL(cb2, OnConnectedPtr(_)) | 367 EXPECT_CALL(cb2, OnConnectedPtr(_)) |
| 368 .Times(0); | 368 .Times(0); |
| 369 | 369 |
| 370 base::RunLoop().RunUntilIdle(); | 370 base::RunLoop().RunUntilIdle(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 } // namespace protocol | 373 } // namespace protocol |
| 374 } // namespace remoting | 374 } // namespace remoting |
| OLD | NEW |