Index: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
index 7e0ac312c804df4cb4a0c67e135ed7c1f4397b93..c3539fc8d55141b2740bbf19554e23cbc6a4ad9b 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
@@ -295,6 +295,8 @@ TEST_F(RtpRtcpImplTest, Rtt) { |
header.headerLength = 12; |
receiver_.receive_statistics_->IncomingPacket(header, 100, false); |
+ // Send Frame before sending a SR. |
+ SendFrame(&sender_, kBaseLayerTid); |
// Sender module should send a SR. |
EXPECT_EQ(0, sender_.impl_->SendRTCP(kRtcpReport)); |
@@ -341,6 +343,8 @@ TEST_F(RtpRtcpImplTest, RttForReceiverOnly) { |
// Sender module should send a response to the last received RTRR (DLRR). |
clock_.AdvanceTimeMilliseconds(1000); |
+ // Send Frame before sending a SR. |
+ SendFrame(&sender_, kBaseLayerTid); |
EXPECT_EQ(0, sender_.impl_->SendRTCP(kRtcpReport)); |
// Verify RTT. |
@@ -460,6 +464,8 @@ TEST_F(RtpRtcpImplTest, SendsInitialNackList) { |
const uint16_t kNackLength = 1; |
uint16_t nack_list[kNackLength] = {123}; |
EXPECT_EQ(0U, sender_.RtcpSent().nack_packets); |
+ // Send Frame before sending a compound RTCP that starts with SR. |
+ SendFrame(&sender_, kBaseLayerTid); |
EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength)); |
EXPECT_EQ(1U, sender_.RtcpSent().nack_packets); |
EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123)); |
@@ -470,6 +476,8 @@ TEST_F(RtpRtcpImplTest, SendsExtendedNackList) { |
const uint16_t kNackLength = 1; |
uint16_t nack_list[kNackLength] = {123}; |
EXPECT_EQ(0U, sender_.RtcpSent().nack_packets); |
+ // Send Frame before sending a compound RTCP that starts with SR. |
+ SendFrame(&sender_, kBaseLayerTid); |
EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength)); |
EXPECT_EQ(1U, sender_.RtcpSent().nack_packets); |
EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123)); |
@@ -493,6 +501,8 @@ TEST_F(RtpRtcpImplTest, ReSendsNackListAfterRttMs) { |
const uint16_t kNackLength = 2; |
uint16_t nack_list[kNackLength] = {123, 125}; |
EXPECT_EQ(0U, sender_.RtcpSent().nack_packets); |
+ // Send Frame before sending a compound RTCP that starts with SR. |
+ SendFrame(&sender_, kBaseLayerTid); |
EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength)); |
EXPECT_EQ(1U, sender_.RtcpSent().nack_packets); |
EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123, 125)); |