summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/connection_to_client_unittest.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 23:44:45 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 23:44:45 +0000
commitc56acf54ff891a942b62effd95fd7a1984533cab (patch)
treee631a3d707fdd74acc670a54bfc3dac7631524e1 /remoting/protocol/connection_to_client_unittest.cc
parentb1308bd418eefc8b1f3410724229c1016a47f01d (diff)
downloadchromium_src-c56acf54ff891a942b62effd95fd7a1984533cab.zip
chromium_src-c56acf54ff891a942b62effd95fd7a1984533cab.tar.gz
chromium_src-c56acf54ff891a942b62effd95fd7a1984533cab.tar.bz2
Use VideoStub interface on the host side.
BUG=None TEST=None Review URL: http://codereview.chromium.org/5232004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/connection_to_client_unittest.cc')
-rw-r--r--remoting/protocol/connection_to_client_unittest.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc
index eaea342..1420392 100644
--- a/remoting/protocol/connection_to_client_unittest.cc
+++ b/remoting/protocol/connection_to_client_unittest.cc
@@ -50,8 +50,9 @@ class ConnectionToClientTest : public testing::Test {
TEST_F(ConnectionToClientTest, SendUpdateStream) {
// Then send the actual data.
- VideoPacket packet;
- viewer_->SendVideoPacket(packet);
+ VideoPacket* packet = new VideoPacket();
+ viewer_->video_stub()->ProcessVideoPacket(
+ packet, new DeleteTask<VideoPacket>(packet));
// And then close the connection to ConnectionToClient.
viewer_->Disconnect();
@@ -73,20 +74,14 @@ TEST_F(ConnectionToClientTest, StateChange) {
message_loop_.RunAllPending();
}
-// Test that we can close client connection more than once and operations
-// after the connection is closed has no effect.
+// Test that we can close client connection more than once.
TEST_F(ConnectionToClientTest, Close) {
viewer_->Disconnect();
message_loop_.RunAllPending();
EXPECT_TRUE(session_->is_closed());
- VideoPacket packet;
- viewer_->SendVideoPacket(packet);
viewer_->Disconnect();
message_loop_.RunAllPending();
-
- // Verify that nothing has been written.
- EXPECT_EQ(session_->video_channel()->written_data().size(), 0u);
}
} // namespace protocol