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

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

Issue 11363128: Converted VideoFrameCapturer callbacks into a VideoFrameCapturer::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « no previous file | remoting/host/host_mock_objects.h » ('j') | remoting/host/video_frame_capturer.h » ('J')
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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | remoting/host/host_mock_objects.h » ('j') | remoting/host/video_frame_capturer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698