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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |