| 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "remoting/base/auto_thread_task_runner.h" | 6 #include "remoting/base/auto_thread_task_runner.h" |
| 7 #include "remoting/base/constants.h" | 7 #include "remoting/base/constants.h" |
| 8 #include "remoting/host/audio_capturer.h" | 8 #include "remoting/host/audio_capturer.h" |
| 9 #include "remoting/host/client_session.h" | 9 #include "remoting/host/client_session.h" |
| 10 #include "remoting/host/desktop_environment.h" | 10 #include "remoting/host/desktop_environment.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Verify that the client session has been stopped. | 94 // Verify that the client session has been stopped. |
| 95 EXPECT_TRUE(client_session_.get() == NULL); | 95 EXPECT_TRUE(client_session_.get() == NULL); |
| 96 } | 96 } |
| 97 | 97 |
| 98 protected: | 98 protected: |
| 99 DesktopEnvironment* CreateDesktopEnvironment(ClientSession* client) { | 99 DesktopEnvironment* CreateDesktopEnvironment(ClientSession* client) { |
| 100 MockVideoFrameCapturer* capturer = new MockVideoFrameCapturer(); | 100 MockVideoFrameCapturer* capturer = new MockVideoFrameCapturer(); |
| 101 EXPECT_CALL(*capturer, Start(_)); | 101 EXPECT_CALL(*capturer, Start(_)); |
| 102 EXPECT_CALL(*capturer, Stop()); | 102 EXPECT_CALL(*capturer, Stop()); |
| 103 EXPECT_CALL(*capturer, InvalidateRegion(_)).Times(AnyNumber()); | 103 EXPECT_CALL(*capturer, InvalidateRegion(_)).Times(AnyNumber()); |
| 104 EXPECT_CALL(*capturer, CaptureInvalidRegion(_)).Times(AnyNumber()); | 104 EXPECT_CALL(*capturer, CaptureInvalidRegion()).Times(AnyNumber()); |
| 105 EXPECT_CALL(*capturer, size_most_recent()) | 105 EXPECT_CALL(*capturer, size_most_recent()) |
| 106 .WillRepeatedly(ReturnRef(screen_size_)); | 106 .WillRepeatedly(ReturnRef(screen_size_)); |
| 107 | 107 |
| 108 EXPECT_TRUE(!event_executor_); | 108 EXPECT_TRUE(!event_executor_); |
| 109 event_executor_ = new MockEventExecutor(); | 109 event_executor_ = new MockEventExecutor(); |
| 110 return new DesktopEnvironment(scoped_ptr<AudioCapturer>(NULL), | 110 return new DesktopEnvironment(scoped_ptr<AudioCapturer>(NULL), |
| 111 scoped_ptr<EventExecutor>(event_executor_), | 111 scoped_ptr<EventExecutor>(event_executor_), |
| 112 scoped_ptr<VideoFrameCapturer>(capturer)); | 112 scoped_ptr<VideoFrameCapturer>(capturer)); |
| 113 } | 113 } |
| 114 | 114 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 expected_y[j]))) | 366 expected_y[j]))) |
| 367 .After(connected); | 367 .After(connected); |
| 368 connection_->input_stub()->InjectMouseEvent(event); | 368 connection_->input_stub()->InjectMouseEvent(event); |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 DisconnectClientSession(); | 372 DisconnectClientSession(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace remoting | 375 } // namespace remoting |
| OLD | NEW |