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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "remoting/host/capturer_fake.h" | 9 #include "remoting/host/capturer_fake.h" |
10 #include "remoting/host/chromoting_host.h" | 10 #include "remoting/host/chromoting_host.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 using testing::InvokeWithoutArgs; | 38 using testing::InvokeWithoutArgs; |
39 using testing::Return; | 39 using testing::Return; |
40 using testing::ReturnRef; | 40 using testing::ReturnRef; |
41 using testing::Sequence; | 41 using testing::Sequence; |
42 | 42 |
43 namespace remoting { | 43 namespace remoting { |
44 | 44 |
45 namespace { | 45 namespace { |
46 | 46 |
47 void PostQuitTask(MessageLoop* message_loop) { | 47 void PostQuitTask(MessageLoop* message_loop) { |
48 message_loop->PostTask(FROM_HERE, new MessageLoop::QuitTask()); | 48 message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
49 } | 49 } |
50 | 50 |
51 // Run the task and delete it afterwards. This action is used to deal with | 51 // Run the task and delete it afterwards. This action is used to deal with |
52 // done callbacks. | 52 // done callbacks. |
53 ACTION(RunDoneTask) { | 53 ACTION(RunDoneTask) { |
54 arg1.Run(); | 54 arg1.Run(); |
55 } | 55 } |
56 | 56 |
57 ACTION_P(QuitMainMessageLoop, message_loop) { | 57 ACTION_P(QuitMainMessageLoop, message_loop) { |
58 PostQuitTask(message_loop); | 58 PostQuitTask(message_loop); |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 EXPECT_CALL(*connection_, Disconnect()) | 366 EXPECT_CALL(*connection_, Disconnect()) |
367 .RetiresOnSaturation(); | 367 .RetiresOnSaturation(); |
368 EXPECT_CALL(*connection2_, Disconnect()) | 368 EXPECT_CALL(*connection2_, Disconnect()) |
369 .RetiresOnSaturation(); | 369 .RetiresOnSaturation(); |
370 | 370 |
371 SimulateClientConnection(0, true); | 371 SimulateClientConnection(0, true); |
372 message_loop_.Run(); | 372 message_loop_.Run(); |
373 } | 373 } |
374 | 374 |
375 } // namespace remoting | 375 } // namespace remoting |
OLD | NEW |