Index: webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc |
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc b/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc |
index 7ddd31467b96951de1e80c484224fa896b1b48d8..3c3c7297e189bf09f15f8f8390f0dde2b2b8d62e 100644 |
--- a/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc |
+++ b/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy_unittest.cc |
@@ -82,6 +82,31 @@ TEST_F(RemoteEstimatorProxyTest, SendsSinglePacketFeedback) { |
Process(); |
} |
+TEST_F(RemoteEstimatorProxyTest, DuplicatedPackets) { |
+ IncomingPacket(kBaseSeq, kBaseTimeMs); |
+ IncomingPacket(kBaseSeq, kBaseTimeMs + 1000); |
+ |
+ EXPECT_CALL(router_, SendFeedback(_)) |
+ .Times(1) |
+ .WillOnce(Invoke([this](rtcp::TransportFeedback* packet) { |
+ packet->Build(); |
+ EXPECT_EQ(kBaseSeq, packet->GetBaseSequence()); |
+ EXPECT_EQ(kMediaSsrc, packet->GetMediaSourceSsrc()); |
+ |
+ std::vector<rtcp::TransportFeedback::StatusSymbol> status_vec = |
+ packet->GetStatusVector(); |
+ EXPECT_EQ(1u, status_vec.size()); |
+ EXPECT_EQ(rtcp::TransportFeedback::StatusSymbol::kReceivedSmallDelta, |
+ status_vec[0]); |
+ std::vector<int64_t> delta_vec = packet->GetReceiveDeltasUs(); |
+ EXPECT_EQ(1u, delta_vec.size()); |
+ EXPECT_EQ(kBaseTimeMs, (packet->GetBaseTimeUs() + delta_vec[0]) / 1000); |
+ return true; |
+ })); |
+ |
+ Process(); |
+} |
+ |
TEST_F(RemoteEstimatorProxyTest, SendsFeedbackWithVaryingDeltas) { |
IncomingPacket(kBaseSeq, kBaseTimeMs); |
IncomingPacket(kBaseSeq + 1, kBaseTimeMs + kMaxSmallDeltaMs); |