| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "remoting/base/auto_thread_task_runner.h" | 8 #include "remoting/base/auto_thread_task_runner.h" |
| 9 #include "remoting/host/audio_capturer.h" | 9 #include "remoting/host/audio_capturer.h" |
| 10 #include "remoting/host/chromoting_host.h" | 10 #include "remoting/host/chromoting_host.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 using testing::Return; | 46 using testing::Return; |
| 47 using testing::ReturnRef; | 47 using testing::ReturnRef; |
| 48 using testing::SaveArg; | 48 using testing::SaveArg; |
| 49 using testing::Sequence; | 49 using testing::Sequence; |
| 50 | 50 |
| 51 namespace remoting { | 51 namespace remoting { |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| 54 | 54 |
| 55 void PostQuitTask(base::MessageLoop* message_loop) { | 55 void PostQuitTask(base::MessageLoop* message_loop) { |
| 56 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); | 56 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 57 } | 57 } |
| 58 | 58 |
| 59 // Run the task and delete it afterwards. This action is used to deal with | 59 // Run the task and delete it afterwards. This action is used to deal with |
| 60 // done callbacks. | 60 // done callbacks. |
| 61 ACTION(RunDoneTask) { | 61 ACTION(RunDoneTask) { |
| 62 arg1.Run(); | 62 arg1.Run(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace | 65 } // namespace |
| 66 | 66 |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 ExpectClientDisconnected(0, true, video_packet_sent, | 670 ExpectClientDisconnected(0, true, video_packet_sent, |
| 671 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); | 671 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); |
| 672 EXPECT_CALL(host_status_observer_, OnShutdown()); | 672 EXPECT_CALL(host_status_observer_, OnShutdown()); |
| 673 | 673 |
| 674 host_->Start(xmpp_login_); | 674 host_->Start(xmpp_login_); |
| 675 SimulateClientConnection(0, true, false); | 675 SimulateClientConnection(0, true, false); |
| 676 message_loop_.Run(); | 676 message_loop_.Run(); |
| 677 } | 677 } |
| 678 | 678 |
| 679 } // namespace remoting | 679 } // namespace remoting |
| OLD | NEW |