| 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 "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 "remoting/jingle_glue/mock_objects.h" | 8 #include "remoting/jingle_glue/mock_objects.h" |
| 9 #include "remoting/host/audio_capturer.h" | 9 #include "remoting/host/audio_capturer.h" |
| 10 #include "remoting/host/chromoting_host_context.h" | 10 #include "remoting/host/chromoting_host_context.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 if (expect_host_status_change) { | 361 if (expect_host_status_change) { |
| 362 EXPECT_CALL(host_status_observer_, OnClientDisconnected(session_jid)) | 362 EXPECT_CALL(host_status_observer_, OnClientDisconnected(session_jid)) |
| 363 .After(after) | 363 .After(after) |
| 364 .RetiresOnSaturation(); | 364 .RetiresOnSaturation(); |
| 365 } | 365 } |
| 366 } | 366 } |
| 367 | 367 |
| 368 protected: | 368 protected: |
| 369 MessageLoop message_loop_; | 369 MessageLoop message_loop_; |
| 370 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 370 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 371 MockChromotingHostContext context_; |
| 371 MockConnectionToClientEventHandler handler_; | 372 MockConnectionToClientEventHandler handler_; |
| 372 MockSignalStrategy signal_strategy_; | 373 MockSignalStrategy signal_strategy_; |
| 373 MockEventExecutor* event_executor_; | 374 MockEventExecutor* event_executor_; |
| 374 scoped_ptr<DesktopEnvironment> desktop_environment_; | 375 scoped_ptr<DesktopEnvironment> desktop_environment_; |
| 375 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_; | 376 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_; |
| 376 scoped_refptr<ChromotingHost> host_; | 377 scoped_refptr<ChromotingHost> host_; |
| 377 MockHostStatusObserver host_status_observer_; | 378 MockHostStatusObserver host_status_observer_; |
| 378 MockChromotingHostContext context_; | |
| 379 protocol::MockSessionManager* session_manager_; | 379 protocol::MockSessionManager* session_manager_; |
| 380 std::string xmpp_login_; | 380 std::string xmpp_login_; |
| 381 MockConnectionToClient* connection1_; | 381 MockConnectionToClient* connection1_; |
| 382 scoped_ptr<MockConnectionToClient> owned_connection1_; | 382 scoped_ptr<MockConnectionToClient> owned_connection1_; |
| 383 ClientSession* client1_; | 383 ClientSession* client1_; |
| 384 std::string session_jid1_; | 384 std::string session_jid1_; |
| 385 MockSession* session1_; // Owned by |connection_|. | 385 MockSession* session1_; // Owned by |connection_|. |
| 386 SessionConfig session_config1_; | 386 SessionConfig session_config1_; |
| 387 MockVideoStub video_stub1_; | 387 MockVideoStub video_stub1_; |
| 388 MockClientStub client_stub1_; | 388 MockClientStub client_stub1_; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 ExpectClientDisconnected(0, true, video_packet_sent, | 632 ExpectClientDisconnected(0, true, video_packet_sent, |
| 633 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); | 633 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); |
| 634 EXPECT_CALL(host_status_observer_, OnShutdown()); | 634 EXPECT_CALL(host_status_observer_, OnShutdown()); |
| 635 | 635 |
| 636 host_->Start(xmpp_login_); | 636 host_->Start(xmpp_login_); |
| 637 SimulateClientConnection(0, true, false); | 637 SimulateClientConnection(0, true, false); |
| 638 message_loop_.Run(); | 638 message_loop_.Run(); |
| 639 } | 639 } |
| 640 | 640 |
| 641 } // namespace remoting | 641 } // namespace remoting |
| OLD | NEW |