OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 packet_router_->SetTransportWideSequenceNumber(kStartSeq - 1); | 236 packet_router_->SetTransportWideSequenceNumber(kStartSeq - 1); |
237 | 237 |
238 for (size_t i = 0; i < kNumPackets; ++i) { | 238 for (size_t i = 0; i < kNumPackets; ++i) { |
239 uint16_t seq = packet_router_->AllocateSequenceNumber(); | 239 uint16_t seq = packet_router_->AllocateSequenceNumber(); |
240 uint32_t expected_unwrapped_seq = static_cast<uint32_t>(kStartSeq) + i; | 240 uint32_t expected_unwrapped_seq = static_cast<uint32_t>(kStartSeq) + i; |
241 EXPECT_EQ(static_cast<uint16_t>(expected_unwrapped_seq & 0xFFFF), seq); | 241 EXPECT_EQ(static_cast<uint16_t>(expected_unwrapped_seq & 0xFFFF), seq); |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 TEST_F(PacketRouterTest, SendFeedback) { | 245 TEST_F(PacketRouterTest, SendTransportFeedback) { |
246 MockRtpRtcp rtp_1; | 246 MockRtpRtcp rtp_1; |
247 MockRtpRtcp rtp_2; | 247 MockRtpRtcp rtp_2; |
248 packet_router_->AddSendRtpModule(&rtp_1); | 248 packet_router_->AddSendRtpModule(&rtp_1); |
249 packet_router_->AddReceiveRtpModule(&rtp_2); | 249 packet_router_->AddReceiveRtpModule(&rtp_2); |
250 | 250 |
251 rtcp::TransportFeedback feedback; | 251 rtcp::TransportFeedback feedback; |
252 EXPECT_CALL(rtp_1, SendFeedbackPacket(_)).Times(1); | 252 EXPECT_CALL(rtp_1, SendFeedbackPacket(_)).Times(1); |
253 packet_router_->SendFeedback(&feedback); | 253 packet_router_->SendTransportFeedback(&feedback); |
254 packet_router_->RemoveSendRtpModule(&rtp_1); | 254 packet_router_->RemoveSendRtpModule(&rtp_1); |
255 EXPECT_CALL(rtp_2, SendFeedbackPacket(_)).Times(1); | 255 EXPECT_CALL(rtp_2, SendFeedbackPacket(_)).Times(1); |
256 packet_router_->SendFeedback(&feedback); | 256 packet_router_->SendTransportFeedback(&feedback); |
257 packet_router_->RemoveReceiveRtpModule(&rtp_2); | 257 packet_router_->RemoveReceiveRtpModule(&rtp_2); |
258 } | 258 } |
259 } // namespace webrtc | 259 } // namespace webrtc |
OLD | NEW |