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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc

Issue 1327933003: Enable probing with repeated payload packets by default. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing yet another flake in libjingle tests. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index 409be1a66ce16ad7fb9b6f5c4559eadf5f154ae3..4552e901b3507d96332033a62604cfceb1742355 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -739,6 +739,7 @@ TEST_F(RtpSenderTest, SendPadding) {
int64_t capture_time_ms = fake_clock_.TimeInMilliseconds();
int rtp_length_int = rtp_sender_->BuildRTPheader(
packet_, kPayload, kMarkerBit, timestamp, capture_time_ms);
+ const uint32_t media_packet_timestamp = timestamp;
ASSERT_NE(-1, rtp_length_int);
size_t rtp_length = static_cast<size_t>(rtp_length_int);
@@ -779,11 +780,13 @@ TEST_F(RtpSenderTest, SendPadding) {
&rtp_header));
EXPECT_EQ(kMaxPaddingLength, rtp_header.paddingLength);
- // Verify sequence number and timestamp.
+ // Verify sequence number and timestamp. The timestamp should be the same
+ // as the last media packet.
EXPECT_EQ(seq_num++, rtp_header.sequenceNumber);
- EXPECT_EQ(timestamp, rtp_header.timestamp);
+ EXPECT_EQ(media_packet_timestamp, rtp_header.timestamp);
// Verify transmission time offset.
- EXPECT_EQ(0, rtp_header.extension.transmissionTimeOffset);
+ int offset = timestamp - media_packet_timestamp;
+ EXPECT_EQ(offset, rtp_header.extension.transmissionTimeOffset);
uint64_t expected_send_time =
ConvertMsToAbsSendTime(fake_clock_.TimeInMilliseconds());
EXPECT_EQ(expected_send_time, rtp_header.extension.absoluteSendTime);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698