OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/callback.h" | 7 #include "base/callback.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( | 363 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( |
364 new MockDesktopEnvironmentFactory()); | 364 new MockDesktopEnvironmentFactory()); |
365 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) | 365 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) |
366 .Times(AnyNumber()) | 366 .Times(AnyNumber()) |
367 .WillRepeatedly(Invoke( | 367 .WillRepeatedly(Invoke( |
368 this, &IpcDesktopEnvironmentTest::CreateDesktopEnvironment)); | 368 this, &IpcDesktopEnvironmentTest::CreateDesktopEnvironment)); |
369 EXPECT_CALL(*desktop_environment_factory, SupportsAudioCapture()) | 369 EXPECT_CALL(*desktop_environment_factory, SupportsAudioCapture()) |
370 .Times(AnyNumber()) | 370 .Times(AnyNumber()) |
371 .WillRepeatedly(Return(false)); | 371 .WillRepeatedly(Return(false)); |
372 | 372 |
373 // TODO(alexeypa): Fix DesktopProcess to use the desktop environment | |
374 // to create the disconnect window instead of directly calling | |
375 // DisconnectWindow::Create(). This will take care of "Uninteresting mock | |
376 // function call" warnings printed when DisconnectWindow::Show() and | |
377 // DisconnectWindow::Hide() are called. | |
378 EXPECT_TRUE(desktop_process_->Start( | 373 EXPECT_TRUE(desktop_process_->Start( |
379 desktop_environment_factory.PassAs<DesktopEnvironmentFactory>())); | 374 desktop_environment_factory.PassAs<DesktopEnvironmentFactory>())); |
380 } | 375 } |
381 | 376 |
382 void IpcDesktopEnvironmentTest::DestoyDesktopProcess() { | 377 void IpcDesktopEnvironmentTest::DestoyDesktopProcess() { |
383 desktop_channel_.reset(); | 378 desktop_channel_.reset(); |
384 if (desktop_process_) { | 379 if (desktop_process_) { |
385 desktop_process_->OnChannelError(); | 380 desktop_process_->OnChannelError(); |
386 desktop_process_.reset(); | 381 desktop_process_.reset(); |
387 } | 382 } |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 event.set_x(0); | 651 event.set_x(0); |
657 event.set_y(0); | 652 event.set_y(0); |
658 input_injector_->InjectMouseEvent(event); | 653 input_injector_->InjectMouseEvent(event); |
659 | 654 |
660 task_runner_ = NULL; | 655 task_runner_ = NULL; |
661 io_task_runner_ = NULL; | 656 io_task_runner_ = NULL; |
662 main_run_loop_.Run(); | 657 main_run_loop_.Run(); |
663 } | 658 } |
664 | 659 |
665 } // namespace remoting | 660 } // namespace remoting |
OLD | NEW |