| 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/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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 const tracked_objects::Location&, Task*)>(&MessageLoop::PostTask), | 91 const tracked_objects::Location&, Task*)>(&MessageLoop::PostTask), |
| 92 base::Unretained(&message_loop_))); | 92 base::Unretained(&message_loop_))); |
| 93 | 93 |
| 94 Capturer* capturer = new CapturerFake(); | 94 Capturer* capturer = new CapturerFake(); |
| 95 event_executor_ = new MockEventExecutor(); | 95 event_executor_ = new MockEventExecutor(); |
| 96 curtain_ = new MockCurtain(); | 96 curtain_ = new MockCurtain(); |
| 97 disconnect_window_ = new MockDisconnectWindow(); | 97 disconnect_window_ = new MockDisconnectWindow(); |
| 98 continue_window_ = new MockContinueWindow(); | 98 continue_window_ = new MockContinueWindow(); |
| 99 local_input_monitor_ = new MockLocalInputMonitor(); | 99 local_input_monitor_ = new MockLocalInputMonitor(); |
| 100 DesktopEnvironment* desktop = | 100 DesktopEnvironment* desktop = |
| 101 new DesktopEnvironment(capturer, event_executor_, curtain_, | 101 new DesktopEnvironment(&context_, capturer, event_executor_, curtain_, |
| 102 disconnect_window_, continue_window_, | 102 disconnect_window_, continue_window_, |
| 103 local_input_monitor_); | 103 local_input_monitor_); |
| 104 MockAccessVerifier* access_verifier = new MockAccessVerifier(); | 104 MockAccessVerifier* access_verifier = new MockAccessVerifier(); |
| 105 | 105 |
| 106 host_ = ChromotingHost::Create(&context_, config_, | 106 host_ = ChromotingHost::Create(&context_, config_, |
| 107 desktop, access_verifier); | 107 desktop, access_verifier); |
| 108 credentials_.set_type(protocol::PASSWORD); | 108 credentials_.set_type(protocol::PASSWORD); |
| 109 credentials_.set_username("user"); | 109 credentials_.set_username("user"); |
| 110 credentials_.set_credential("password"); | 110 credentials_.set_credential("password"); |
| 111 connection_ = new MockConnectionToClient( | 111 connection_ = new MockConnectionToClient( |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 EXPECT_CALL(*connection_.get(), Disconnect()) | 487 EXPECT_CALL(*connection_.get(), Disconnect()) |
| 488 .InSequence(s1, s2) | 488 .InSequence(s1, s2) |
| 489 .RetiresOnSaturation(); | 489 .RetiresOnSaturation(); |
| 490 } | 490 } |
| 491 SimulateClientConnection(0, true); | 491 SimulateClientConnection(0, true); |
| 492 message_loop_.Run(); | 492 message_loop_.Run(); |
| 493 host_->set_it2me(false); | 493 host_->set_it2me(false); |
| 494 EXPECT_THAT(curtain_activated, false); | 494 EXPECT_THAT(curtain_activated, false); |
| 495 } | 495 } |
| 496 } // namespace remoting | 496 } // namespace remoting |
| OLD | NEW |