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

Side by Side Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc

Issue 2867713003: Remove hardcoded kValueSizeBytes values from variable-length header extensions. (Closed)
Patch Set: Patch 1 Created 3 years, 7 months 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 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 EXPECT_EQ(test_timestamp_, module_->StartTimestamp()); 129 EXPECT_EQ(test_timestamp_, module_->StartTimestamp());
130 130
131 EXPECT_FALSE(module_->Sending()); 131 EXPECT_FALSE(module_->Sending());
132 EXPECT_EQ(0, module_->SetSendingStatus(true)); 132 EXPECT_EQ(0, module_->SetSendingStatus(true));
133 EXPECT_TRUE(module_->Sending()); 133 EXPECT_TRUE(module_->Sending());
134 } 134 }
135 135
136 TEST_F(RtpRtcpAPITest, PacketSize) { 136 TEST_F(RtpRtcpAPITest, PacketSize) {
137 module_->SetMaxRtpPacketSize(1234); 137 module_->SetMaxRtpPacketSize(1234);
138 EXPECT_EQ(1234u, module_->MaxRtpPacketSize()); 138 EXPECT_EQ(1234u, module_->MaxRtpPacketSize());
139 EXPECT_EQ(1234u - 12u /* Minimum RTP header */, module_->MaxPayloadSize()); 139 EXPECT_EQ(1234u - 12u /* Minimum RTP header */,
140 module_->MaxPayloadSize({} /* extension_sizes */));
140 } 141 }
141 142
142 TEST_F(RtpRtcpAPITest, SSRC) { 143 TEST_F(RtpRtcpAPITest, SSRC) {
143 module_->SetSSRC(test_ssrc_); 144 module_->SetSSRC(test_ssrc_);
144 EXPECT_EQ(test_ssrc_, module_->SSRC()); 145 EXPECT_EQ(test_ssrc_, module_->SSRC());
145 } 146 }
146 147
147 TEST_F(RtpRtcpAPITest, RTCP) { 148 TEST_F(RtpRtcpAPITest, RTCP) {
148 EXPECT_EQ(RtcpMode::kOff, module_->RTCP()); 149 EXPECT_EQ(RtcpMode::kOff, module_->RTCP());
149 module_->SetRTCPStatus(RtcpMode::kCompound); 150 module_->SetRTCPStatus(RtcpMode::kCompound);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 rtx_header.payloadType = kRtxPayloadType; 183 rtx_header.payloadType = kRtxPayloadType;
183 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); 184 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header));
184 rtx_header.ssrc = 0; 185 rtx_header.ssrc = 0;
185 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); 186 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header));
186 rtx_header.ssrc = kRtxSsrc; 187 rtx_header.ssrc = kRtxSsrc;
187 rtx_header.payloadType = 0; 188 rtx_header.payloadType = 0;
188 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); 189 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header));
189 } 190 }
190 191
191 } // namespace webrtc 192 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698