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

Unified Diff: webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc

Issue 2714503002: Perform probing on network route change. (Closed)
Patch Set: SendTimeHistoryTest.Clear fix. Created 3 years, 9 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/congestion_controller/transport_feedback_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc b/webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc
index 96e54203daa19ea29bb0f9f9e536e8b748a7556e..93c7b8f06ade4cbe12f631bbac2a0d70bca198ad 100644
--- a/webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc
@@ -213,5 +213,27 @@ TEST_F(SendTimeHistoryTest, InterlievedGetAndRemove) {
EXPECT_EQ(packets[2], packet3);
}
+TEST_F(SendTimeHistoryTest, Clear) {
+ const uint16_t kSeqNo = 1;
+ const int64_t kTimestamp = 2;
+ const PacedPacketInfo kPacingInfo(0, 5, 1200);
+
+ PacketFeedback packets[] = {{0, kTimestamp, kSeqNo, 0, kPacingInfo},
+ {0, kTimestamp + 1, kSeqNo + 1, 0, kPacingInfo}};
+
+ AddPacketWithSendTime(packets[0].sequence_number, packets[0].payload_size,
+ packets[0].send_time_ms, kPacingInfo);
+ AddPacketWithSendTime(packets[1].sequence_number, packets[1].payload_size,
+ packets[1].send_time_ms, kPacingInfo);
+ PacketFeedback info(0, 0, packets[0].sequence_number, 0, kPacingInfo);
+ EXPECT_TRUE(history_.GetFeedback(&info, true));
+ EXPECT_EQ(packets[0], info);
+
+ history_.Clear();
+
+ PacketFeedback info2(0, 0, packets[1].sequence_number, 0, kPacingInfo);
+ EXPECT_FALSE(history_.GetFeedback(&info2, true));
+}
+
} // namespace test
} // namespace webrtc
« no previous file with comments | « webrtc/modules/congestion_controller/transport_feedback_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698