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

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

Issue 10538091: [Chromoting] Make ChromotingHost's dependency on libjingle injected, instead of hard-coded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remoting.gyp. Created 8 years, 6 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
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/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/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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 .Times(AnyNumber()); 85 .Times(AnyNumber());
86 EXPECT_CALL(context_, ui_message_loop()) 86 EXPECT_CALL(context_, ui_message_loop())
87 .Times(AnyNumber()); 87 .Times(AnyNumber());
88 88
89 scoped_ptr<Capturer> capturer(new CapturerFake()); 89 scoped_ptr<Capturer> capturer(new CapturerFake());
90 scoped_ptr<EventExecutor> event_executor(new MockEventExecutor()); 90 scoped_ptr<EventExecutor> event_executor(new MockEventExecutor());
91 desktop_environment_ = DesktopEnvironment::CreateFake( 91 desktop_environment_ = DesktopEnvironment::CreateFake(
92 &context_, 92 &context_,
93 capturer.Pass(), 93 capturer.Pass(),
94 event_executor.Pass()); 94 event_executor.Pass());
95 scoped_ptr<protocol::SessionManager> session_manager(
96 new protocol::MockSessionManager());
95 97
96 host_ = new ChromotingHost( 98 host_ = new ChromotingHost(
97 &context_, &signal_strategy_, desktop_environment_.get(), 99 &context_, &signal_strategy_, desktop_environment_.get(),
98 NetworkSettings()); 100 session_manager.Pass());
Wez 2012/06/12 21:20:10 nit: Pass in the new mock object directly, rather
simonmorris 2012/06/13 16:26:33 In a subsequent CL, the mock object will have expe
99 101
100 disconnect_window_ = new MockDisconnectWindow(); 102 disconnect_window_ = new MockDisconnectWindow();
101 continue_window_ = new MockContinueWindow(); 103 continue_window_ = new MockContinueWindow();
102 local_input_monitor_ = new MockLocalInputMonitor(); 104 local_input_monitor_ = new MockLocalInputMonitor();
103 it2me_host_user_interface_.reset(new It2MeHostUserInterface(&context_)); 105 it2me_host_user_interface_.reset(new It2MeHostUserInterface(&context_));
104 it2me_host_user_interface_->StartForTest( 106 it2me_host_user_interface_->StartForTest(
105 host_, 107 host_,
106 base::Bind(&ChromotingHost::Shutdown, host_, base::Closure()), 108 base::Bind(&ChromotingHost::Shutdown, host_, base::Closure()),
107 scoped_ptr<DisconnectWindow>(disconnect_window_), 109 scoped_ptr<DisconnectWindow>(disconnect_window_),
108 scoped_ptr<ContinueWindow>(continue_window_), 110 scoped_ptr<ContinueWindow>(continue_window_),
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 EXPECT_CALL(*connection_, Disconnect()) 375 EXPECT_CALL(*connection_, Disconnect())
374 .RetiresOnSaturation(); 376 .RetiresOnSaturation();
375 EXPECT_CALL(*connection2_, Disconnect()) 377 EXPECT_CALL(*connection2_, Disconnect())
376 .RetiresOnSaturation(); 378 .RetiresOnSaturation();
377 379
378 SimulateClientConnection(0, true); 380 SimulateClientConnection(0, true);
379 message_loop_.Run(); 381 message_loop_.Run();
380 } 382 }
381 383
382 } // namespace remoting 384 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698