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

Unified Diff: remoting/protocol/ice_connection_to_client_unittest.cc

Issue 1472873005: Add VideoStream interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_video_pump
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/ice_connection_to_client_unittest.cc
diff --git a/remoting/protocol/ice_connection_to_client_unittest.cc b/remoting/protocol/ice_connection_to_client_unittest.cc
index e06f3f196d5852a97f187e9a81676f4d84e8f19f..074a3a5dd608523db5414b5ba6655b2512a6431e 100644
--- a/remoting/protocol/ice_connection_to_client_unittest.cc
+++ b/remoting/protocol/ice_connection_to_client_unittest.cc
@@ -29,7 +29,8 @@ class IpcConnectionToClientTest : public testing::Test {
session_ = new FakeSession();
// Allocate a ClientConnection object with the mock objects.
- viewer_.reset(new IceConnectionToClient(make_scoped_ptr(session_)));
+ viewer_.reset(new IceConnectionToClient(make_scoped_ptr(session_),
+ message_loop_.task_runner()));
viewer_->SetEventHandler(&handler_);
EXPECT_CALL(handler_, OnConnectionAuthenticated(viewer_.get()))
.WillOnce(
@@ -65,8 +66,8 @@ class IpcConnectionToClientTest : public testing::Test {
};
TEST_F(IpcConnectionToClientTest, SendUpdateStream) {
- scoped_ptr<VideoPacket> packet(new VideoPacket());
- viewer_->video_stub()->ProcessVideoPacket(packet.Pass(), base::Closure());
+ Capabilities capabilities;
+ viewer_->client_stub()->SetCapabilities(capabilities);
base::RunLoop().RunUntilIdle();
@@ -74,7 +75,7 @@ TEST_F(IpcConnectionToClientTest, SendUpdateStream) {
// TODO(sergeyu): Verify that the correct data has been written.
FakeStreamSocket* channel =
session_->GetTransport()->GetStreamChannelFactory()->GetFakeChannel(
- kVideoChannelName);
+ kControlChannelName);
ASSERT_TRUE(channel);
EXPECT_FALSE(channel->written_data().empty());
@@ -85,8 +86,8 @@ TEST_F(IpcConnectionToClientTest, SendUpdateStream) {
}
TEST_F(IpcConnectionToClientTest, NoWriteAfterDisconnect) {
- scoped_ptr<VideoPacket> packet(new VideoPacket());
- viewer_->video_stub()->ProcessVideoPacket(packet.Pass(), base::Closure());
+ Capabilities capabilities;
+ viewer_->client_stub()->SetCapabilities(capabilities);
// And then close the connection to ConnectionToClient.
viewer_->Disconnect(protocol::OK);

Powered by Google App Engine
This is Rietveld 408576698