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

Side by Side Diff: remoting/protocol/client_video_dispatcher_unittest.cc

Issue 1413813006: Revert of Add TransportSession interface to prepare for WebRTC-based transport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/protocol/client_video_dispatcher.h" 5 #include "remoting/protocol/client_video_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 parser_(base::Bind(&ClientVideoDispatcherTest::OnVideoAck, 66 parser_(base::Bind(&ClientVideoDispatcherTest::OnVideoAck,
67 base::Unretained(this)), 67 base::Unretained(this)),
68 &reader_) { 68 &reader_) {
69 dispatcher_.Init(&session_, ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM, 69 dispatcher_.Init(&session_, ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM,
70 kDefaultStreamVersion, 70 kDefaultStreamVersion,
71 ChannelConfig::CODEC_UNDEFINED), 71 ChannelConfig::CODEC_UNDEFINED),
72 this); 72 this);
73 base::RunLoop().RunUntilIdle(); 73 base::RunLoop().RunUntilIdle();
74 DCHECK(initialized_); 74 DCHECK(initialized_);
75 host_socket_.PairWith( 75 host_socket_.PairWith(
76 session_.GetTransportSession()->GetStreamChannelFactory()->GetFakeChannel( 76 session_.fake_channel_factory().GetFakeChannel(kVideoChannelName));
77 kVideoChannelName));
78 reader_.StartReading(&host_socket_, 77 reader_.StartReading(&host_socket_,
79 base::Bind(&ClientVideoDispatcherTest::OnReadError, 78 base::Bind(&ClientVideoDispatcherTest::OnReadError,
80 base::Unretained(this))); 79 base::Unretained(this)));
81 writer_.Init( 80 writer_.Init(
82 base::Bind(&P2PStreamSocket::Write, base::Unretained(&host_socket_)), 81 base::Bind(&P2PStreamSocket::Write, base::Unretained(&host_socket_)),
83 BufferedSocketWriter::WriteFailedCallback()); 82 BufferedSocketWriter::WriteFailedCallback());
84 } 83 }
85 84
86 void ClientVideoDispatcherTest::ProcessVideoPacket( 85 void ClientVideoDispatcherTest::ProcessVideoPacket(
87 scoped_ptr<VideoPacket> video_packet, 86 scoped_ptr<VideoPacket> video_packet,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 base::RunLoop().RunUntilIdle(); 181 base::RunLoop().RunUntilIdle();
183 182
184 // Verify order of Ack messages. 183 // Verify order of Ack messages.
185 ASSERT_EQ(2U, ack_messages_.size()); 184 ASSERT_EQ(2U, ack_messages_.size());
186 EXPECT_EQ(kTestFrameId, ack_messages_[0]->frame_id()); 185 EXPECT_EQ(kTestFrameId, ack_messages_[0]->frame_id());
187 EXPECT_EQ(kTestFrameId + 1, ack_messages_[1]->frame_id()); 186 EXPECT_EQ(kTestFrameId + 1, ack_messages_[1]->frame_id());
188 } 187 }
189 188
190 } // namespace protocol 189 } // namespace protocol
191 } // namespace remoting 190 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/channel_multiplexer_unittest.cc ('k') | remoting/protocol/connection_to_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698