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/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "remoting/base/auto_thread_task_runner.h" | 9 #include "remoting/base/auto_thread_task_runner.h" |
10 #include "remoting/capturer/video_frame_capturer_fake.h" | 10 #include "remoting/capturer/video_frame_capturer_fake.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 // A test-only version of Start that does not register a HostStatusObserver. | 76 // A test-only version of Start that does not register a HostStatusObserver. |
77 // TODO(rmsousa): Make the unit tests work with the regular Start(). | 77 // TODO(rmsousa): Make the unit tests work with the regular Start(). |
78 virtual void Start(ChromotingHost* host, | 78 virtual void Start(ChromotingHost* host, |
79 const base::Closure& disconnect_callback) OVERRIDE; | 79 const base::Closure& disconnect_callback) OVERRIDE; |
80 }; | 80 }; |
81 | 81 |
82 MockIt2MeHostUserInterface::MockIt2MeHostUserInterface( | 82 MockIt2MeHostUserInterface::MockIt2MeHostUserInterface( |
83 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, | 83 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
84 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) | 84 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) |
85 : It2MeHostUserInterface(network_task_runner, ui_task_runner) { | 85 : It2MeHostUserInterface(network_task_runner, ui_task_runner, UiStrings()) { |
86 } | 86 } |
87 | 87 |
88 void MockIt2MeHostUserInterface::InitFrom( | 88 void MockIt2MeHostUserInterface::InitFrom( |
89 scoped_ptr<DisconnectWindow> disconnect_window, | 89 scoped_ptr<DisconnectWindow> disconnect_window, |
90 scoped_ptr<ContinueWindow> continue_window, | 90 scoped_ptr<ContinueWindow> continue_window, |
91 scoped_ptr<LocalInputMonitor> local_input_monitor) { | 91 scoped_ptr<LocalInputMonitor> local_input_monitor) { |
92 DCHECK(ui_task_runner()->BelongsToCurrentThread()); | 92 DCHECK(ui_task_runner()->BelongsToCurrentThread()); |
93 | 93 |
94 disconnect_window_ = disconnect_window.Pass(); | 94 disconnect_window_ = disconnect_window.Pass(); |
95 continue_window_ = continue_window.Pass(); | 95 continue_window_ = continue_window.Pass(); |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 ExpectClientDisconnected(0, true, video_packet_sent, | 719 ExpectClientDisconnected(0, true, video_packet_sent, |
720 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); | 720 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); |
721 EXPECT_CALL(host_status_observer_, OnShutdown()); | 721 EXPECT_CALL(host_status_observer_, OnShutdown()); |
722 | 722 |
723 host_->Start(xmpp_login_); | 723 host_->Start(xmpp_login_); |
724 SimulateClientConnection(0, true, false); | 724 SimulateClientConnection(0, true, false); |
725 message_loop_.Run(); | 725 message_loop_.Run(); |
726 } | 726 } |
727 | 727 |
728 } // namespace remoting | 728 } // namespace remoting |
OLD | NEW |