| 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 "remoting/host/ipc_desktop_environment.h" | 5 #include "remoting/host/ipc_desktop_environment.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 } | 444 } |
| 445 | 445 |
| 446 void IpcDesktopEnvironmentTest::OnDisconnectCallback() { | 446 void IpcDesktopEnvironmentTest::OnDisconnectCallback() { |
| 447 DeleteDesktopEnvironment(); | 447 DeleteDesktopEnvironment(); |
| 448 } | 448 } |
| 449 | 449 |
| 450 void IpcDesktopEnvironmentTest::OnDesktopAttached( | 450 void IpcDesktopEnvironmentTest::OnDesktopAttached( |
| 451 const IPC::ChannelHandle& desktop_pipe) { | 451 const IPC::ChannelHandle& desktop_pipe) { |
| 452 // Instruct DesktopSessionProxy to connect to the network-to-desktop pipe. | 452 // Instruct DesktopSessionProxy to connect to the network-to-desktop pipe. |
| 453 desktop_environment_factory_->OnDesktopSessionAgentAttached( | 453 desktop_environment_factory_->OnDesktopSessionAgentAttached( |
| 454 terminal_id_, desktop_pipe); | 454 terminal_id_, /*session_id=*/0, desktop_pipe); |
| 455 } | 455 } |
| 456 | 456 |
| 457 void IpcDesktopEnvironmentTest::RunMainLoopUntilDone() { | 457 void IpcDesktopEnvironmentTest::RunMainLoopUntilDone() { |
| 458 task_runner_ = nullptr; | 458 task_runner_ = nullptr; |
| 459 io_task_runner_ = nullptr; | 459 io_task_runner_ = nullptr; |
| 460 main_run_loop_.Run(); | 460 main_run_loop_.Run(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 // Runs until the desktop is attached and exits immediately after that. | 463 // Runs until the desktop is attached and exits immediately after that. |
| 464 TEST_F(IpcDesktopEnvironmentTest, Basic) { | 464 TEST_F(IpcDesktopEnvironmentTest, Basic) { |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 .WillOnce(InvokeWithoutArgs( | 725 .WillOnce(InvokeWithoutArgs( |
| 726 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); | 726 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); |
| 727 | 727 |
| 728 // Change the desktop resolution. | 728 // Change the desktop resolution. |
| 729 screen_controls_->SetScreenResolution(ScreenResolution( | 729 screen_controls_->SetScreenResolution(ScreenResolution( |
| 730 webrtc::DesktopSize(100, 100), | 730 webrtc::DesktopSize(100, 100), |
| 731 webrtc::DesktopVector(96, 96))); | 731 webrtc::DesktopVector(96, 96))); |
| 732 } | 732 } |
| 733 | 733 |
| 734 } // namespace remoting | 734 } // namespace remoting |
| OLD | NEW |