Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: remoting/host/chromoting_host_unittest.cc

Issue 11886051: Turned UiStrings into a singleton so that the continue window does not depend on ChromotingHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/continue_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/continue_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698