Chromium Code Reviews| 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 "remoting/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 void SetUp() override { | 59 void SetUp() override { |
| 60 task_runner_ = new AutoThreadTaskRunner(message_loop_.task_runner(), | 60 task_runner_ = new AutoThreadTaskRunner(message_loop_.task_runner(), |
| 61 base::Bind(&base::DoNothing)); | 61 base::Bind(&base::DoNothing)); |
| 62 | 62 |
| 63 desktop_environment_factory_.reset(new FakeDesktopEnvironmentFactory()); | 63 desktop_environment_factory_.reset(new FakeDesktopEnvironmentFactory()); |
| 64 session_manager_ = new protocol::MockSessionManager(); | 64 session_manager_ = new protocol::MockSessionManager(); |
| 65 | 65 |
| 66 host_.reset(new ChromotingHost( | 66 host_.reset(new ChromotingHost( |
| 67 desktop_environment_factory_.get(), make_scoped_ptr(session_manager_), | 67 desktop_environment_factory_.get(), make_scoped_ptr(session_manager_), |
| 68 protocol::TransportContext::ForTests(protocol::TransportRole::SERVER), | 68 protocol::TransportContext::ForTests(protocol::TransportRole::SERVER), |
| 69 nullptr, | |
|
garykac
2016/03/15 00:13:16
Can you make this non-null and add some tests here
Sergey Ulanov
2016/03/15 20:17:31
Removed this parameter
| |
| 69 task_runner_, // Audio | 70 task_runner_, // Audio |
| 70 task_runner_)); // Video encode | 71 task_runner_)); // Video encode |
| 71 host_->AddStatusObserver(&host_status_observer_); | 72 host_->AddStatusObserver(&host_status_observer_); |
| 72 | 73 |
| 73 xmpp_login_ = "host@domain"; | 74 xmpp_login_ = "host@domain"; |
| 74 session1_ = new MockSession(); | 75 session1_ = new MockSession(); |
| 75 session2_ = new MockSession(); | 76 session2_ = new MockSession(); |
| 76 session_unowned1_.reset(new MockSession()); | 77 session_unowned1_.reset(new MockSession()); |
| 77 session_unowned2_.reset(new MockSession()); | 78 session_unowned2_.reset(new MockSession()); |
| 78 session_config1_ = SessionConfig::ForTest(); | 79 session_config1_ = SessionConfig::ForTest(); |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 389 | 390 |
| 390 ExpectClientConnected(0); | 391 ExpectClientConnected(0); |
| 391 SimulateClientConnection(0, true, false); | 392 SimulateClientConnection(0, true, false); |
| 392 | 393 |
| 393 ExpectClientDisconnected(0); | 394 ExpectClientDisconnected(0); |
| 394 DisconnectAllClients(); | 395 DisconnectAllClients(); |
| 395 testing::Mock::VerifyAndClearExpectations(&host_status_observer_); | 396 testing::Mock::VerifyAndClearExpectations(&host_status_observer_); |
| 396 } | 397 } |
| 397 | 398 |
| 398 } // namespace remoting | 399 } // namespace remoting |
| OLD | NEW |