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

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

Issue 2083843002: Replace VideoStream::SizeCallback with VideoStream::Observer interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge-sched-stream
Patch Set: Created 4 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
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/protocol/fake_connection_to_client.h » ('j') | no next file with comments »
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 "remoting/host/client_session.h" 5 #include "remoting/host/client_session.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 client_session_->OnConnectionAuthenticated(client_session_->connection()); 203 client_session_->OnConnectionAuthenticated(client_session_->connection());
204 204
205 EXPECT_TRUE(connection_->clipboard_stub()); 205 EXPECT_TRUE(connection_->clipboard_stub());
206 EXPECT_TRUE(connection_->input_stub()); 206 EXPECT_TRUE(connection_->input_stub());
207 207
208 client_session_->CreateVideoStreams(client_session_->connection()); 208 client_session_->CreateVideoStreams(client_session_->connection());
209 client_session_->OnConnectionChannelsConnected(client_session_->connection()); 209 client_session_->OnConnectionChannelsConnected(client_session_->connection());
210 } 210 }
211 211
212 void ClientSessionTest::NotifyVideoSize() { 212 void ClientSessionTest::NotifyVideoSize() {
213 connection_->last_video_stream()->size_callback().Run( 213 connection_->last_video_stream()->observer()->OnVideoSizeChanged(
214 connection_->last_video_stream().get(),
214 webrtc::DesktopSize(protocol::FakeDesktopCapturer::kWidth, 215 webrtc::DesktopSize(protocol::FakeDesktopCapturer::kWidth,
215 protocol::FakeDesktopCapturer::kHeight), 216 protocol::FakeDesktopCapturer::kHeight),
216 webrtc::DesktopVector(kDefaultDpi, kDefaultDpi)); 217 webrtc::DesktopVector(kDefaultDpi, kDefaultDpi));
217 } 218 }
218 219
219 TEST_F(ClientSessionTest, DisableInputs) { 220 TEST_F(ClientSessionTest, DisableInputs) {
220 CreateClientSession(); 221 CreateClientSession();
221 ConnectClientSession(); 222 ConnectClientSession();
222 NotifyVideoSize(); 223 NotifyVideoSize();
223 224
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 424
424 // ext2 was instantiated but not sent a message, and wrapped video encoder. 425 // ext2 was instantiated but not sent a message, and wrapped video encoder.
425 EXPECT_TRUE(extension2.was_instantiated()); 426 EXPECT_TRUE(extension2.was_instantiated());
426 EXPECT_FALSE(extension2.has_handled_message()); 427 EXPECT_FALSE(extension2.has_handled_message());
427 428
428 // ext3 was sent a message but not instantiated. 429 // ext3 was sent a message but not instantiated.
429 EXPECT_FALSE(extension3.was_instantiated()); 430 EXPECT_FALSE(extension3.was_instantiated());
430 } 431 }
431 432
432 } // namespace remoting 433 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/protocol/fake_connection_to_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698