| 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/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 7 #include "base/task.h" | 7 #include "base/task.h" |
| 8 #include "remoting/host/capturer_fake.h" | 8 #include "remoting/host/capturer_fake.h" |
| 9 #include "remoting/host/chromoting_host.h" | 9 #include "remoting/host/chromoting_host.h" |
| 10 #include "remoting/host/chromoting_host_context.h" | 10 #include "remoting/host/chromoting_host_context.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 virtual void SetUp() { | 70 virtual void SetUp() { |
| 71 config_ = new InMemoryHostConfig(); | 71 config_ = new InMemoryHostConfig(); |
| 72 ON_CALL(context_, main_message_loop()) | 72 ON_CALL(context_, main_message_loop()) |
| 73 .WillByDefault(Return(&message_loop_)); | 73 .WillByDefault(Return(&message_loop_)); |
| 74 ON_CALL(context_, encode_message_loop()) | 74 ON_CALL(context_, encode_message_loop()) |
| 75 .WillByDefault(Return(&message_loop_)); | 75 .WillByDefault(Return(&message_loop_)); |
| 76 ON_CALL(context_, network_message_loop()) | 76 ON_CALL(context_, network_message_loop()) |
| 77 .WillByDefault(Return(&message_loop_)); | 77 .WillByDefault(Return(&message_loop_)); |
| 78 ON_CALL(context_, ui_message_loop()) |
| 79 .WillByDefault(Return(&message_loop_)); |
| 78 EXPECT_CALL(context_, main_message_loop()) | 80 EXPECT_CALL(context_, main_message_loop()) |
| 79 .Times(AnyNumber()); | 81 .Times(AnyNumber()); |
| 80 EXPECT_CALL(context_, encode_message_loop()) | 82 EXPECT_CALL(context_, encode_message_loop()) |
| 81 .Times(AnyNumber()); | 83 .Times(AnyNumber()); |
| 82 EXPECT_CALL(context_, network_message_loop()) | 84 EXPECT_CALL(context_, network_message_loop()) |
| 83 .Times(AnyNumber()); | 85 .Times(AnyNumber()); |
| 86 EXPECT_CALL(context_, ui_message_loop()) |
| 87 .Times(AnyNumber()); |
| 84 | 88 |
| 85 Capturer* capturer = new CapturerFake(); | 89 Capturer* capturer = new CapturerFake(); |
| 86 event_executor_ = new MockEventExecutor(); | 90 event_executor_ = new MockEventExecutor(); |
| 87 curtain_ = new MockCurtain(); | 91 curtain_ = new MockCurtain(); |
| 88 disconnect_window_ = new MockDisconnectWindow(); | 92 disconnect_window_ = new MockDisconnectWindow(); |
| 89 DesktopEnvironment* desktop = | 93 DesktopEnvironment* desktop = |
| 90 new DesktopEnvironment(capturer, event_executor_, curtain_, | 94 new DesktopEnvironment(capturer, event_executor_, curtain_, |
| 91 disconnect_window_); | 95 disconnect_window_); |
| 92 MockAccessVerifier* access_verifier = new MockAccessVerifier(); | 96 MockAccessVerifier* access_verifier = new MockAccessVerifier(); |
| 93 | 97 |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 .Times(AnyNumber()); | 462 .Times(AnyNumber()); |
| 459 EXPECT_CALL(*connection_.get(), Disconnect()) | 463 EXPECT_CALL(*connection_.get(), Disconnect()) |
| 460 .RetiresOnSaturation(); | 464 .RetiresOnSaturation(); |
| 461 } | 465 } |
| 462 SimulateClientConnection(0, true); | 466 SimulateClientConnection(0, true); |
| 463 message_loop_.Run(); | 467 message_loop_.Run(); |
| 464 host_->set_me2mom(false); | 468 host_->set_me2mom(false); |
| 465 EXPECT_THAT(curtain_activated, false); | 469 EXPECT_THAT(curtain_activated, false); |
| 466 } | 470 } |
| 467 } // namespace remoting | 471 } // namespace remoting |
| OLD | NEW |