| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 Capturer* capturer = new CapturerFake(); | 90 Capturer* capturer = new CapturerFake(); |
| 91 event_executor_ = new MockEventExecutor(); | 91 event_executor_ = new MockEventExecutor(); |
| 92 curtain_ = new MockCurtain(); | 92 curtain_ = new MockCurtain(); |
| 93 disconnect_window_ = new MockDisconnectWindow(); | 93 disconnect_window_ = new MockDisconnectWindow(); |
| 94 continue_window_ = new MockContinueWindow(); | 94 continue_window_ = new MockContinueWindow(); |
| 95 local_input_monitor_ = new MockLocalInputMonitor(); | 95 local_input_monitor_ = new MockLocalInputMonitor(); |
| 96 desktop_environment_.reset( | 96 desktop_environment_.reset( |
| 97 new DesktopEnvironment(&context_, capturer, event_executor_, curtain_, | 97 new DesktopEnvironment(&context_, capturer, event_executor_, curtain_, |
| 98 disconnect_window_, continue_window_, | 98 disconnect_window_, continue_window_, |
| 99 local_input_monitor_)); | 99 local_input_monitor_)); |
| 100 MockAccessVerifier* access_verifier = new MockAccessVerifier(); | |
| 101 | 100 |
| 102 host_ = ChromotingHost::Create(&context_, config_, | 101 host_ = ChromotingHost::Create( |
| 103 desktop_environment_.get(), | 102 &context_, config_,desktop_environment_.get(), false); |
| 104 access_verifier, false); | |
| 105 session_ = new MockSession(); | 103 session_ = new MockSession(); |
| 106 session2_ = new MockSession(); | 104 session2_ = new MockSession(); |
| 107 session_config_ = SessionConfig::GetDefault(); | 105 session_config_ = SessionConfig::GetDefault(); |
| 108 session_jid_ = "user@domain/rest-of-jid"; | 106 session_jid_ = "user@domain/rest-of-jid"; |
| 109 session_config2_ = SessionConfig::GetDefault(); | 107 session_config2_ = SessionConfig::GetDefault(); |
| 110 session2_jid_ = "user2@domain/rest-of-jid"; | 108 session2_jid_ = "user2@domain/rest-of-jid"; |
| 111 EXPECT_CALL(*session_, jid()) | 109 EXPECT_CALL(*session_, jid()) |
| 112 .WillRepeatedly(ReturnRef(session_jid_)); | 110 .WillRepeatedly(ReturnRef(session_jid_)); |
| 113 EXPECT_CALL(*session2_, jid()) | 111 EXPECT_CALL(*session2_, jid()) |
| 114 .WillRepeatedly(ReturnRef(session2_jid_)); | 112 .WillRepeatedly(ReturnRef(session2_jid_)); |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 .Times(1) | 496 .Times(1) |
| 499 .InSequence(s2); | 497 .InSequence(s2); |
| 500 } | 498 } |
| 501 SimulateClientConnection(0, true); | 499 SimulateClientConnection(0, true); |
| 502 message_loop_.Run(); | 500 message_loop_.Run(); |
| 503 host_->set_it2me(false); | 501 host_->set_it2me(false); |
| 504 EXPECT_THAT(curtain_activated, false); | 502 EXPECT_THAT(curtain_activated, false); |
| 505 } | 503 } |
| 506 | 504 |
| 507 } // namespace remoting | 505 } // namespace remoting |
| OLD | NEW |