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

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

Issue 2714503002: Perform probing on network route change. (Closed)
Patch Set: Re-added const to |probe_controller_|. Created 3 years, 10 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
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 ce7d021587605005df2016813d599d0e48defbdf..0855817d3c3778ccf3e96b8181e90d8cfc9e6570 100644
--- a/webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/send_time_history_unittest.cc
@@ -238,5 +238,28 @@ TEST_F(SendTimeHistoryTest, InterlievedGetAndRemove) {
EXPECT_EQ(packets[2], info3);
}
+TEST_F(SendTimeHistoryTest, Clear) {
+ const uint16_t kSeqNo = 1;
+ const int64_t kTimestamp = 2;
+ PacketInfo packets[] = {{0, kTimestamp, kSeqNo, 0, 0},
+ {0, kTimestamp + 1, kSeqNo + 1, 0, 1}};
+
+ AddPacketWithSendTime(packets[0].sequence_number, packets[0].payload_size,
+ packets[0].send_time_ms, 0);
+ AddPacketWithSendTime(packets[1].sequence_number, packets[1].payload_size,
+ packets[1].send_time_ms, 1);
+ PacketInfo info(0, 0, packets[0].sequence_number, 0, 0);
+ EXPECT_TRUE(history_.GetInfo(&info, true));
+ EXPECT_EQ(packets[0], info);
+
+ AddPacketWithSendTime(packets[2].sequence_number, packets[2].payload_size,
+ packets[2].send_time_ms, 2);
+
+ history_.Clear();
+
+ PacketInfo info2(0, 0, packets[1].sequence_number, 0, 1);
+ EXPECT_FALSE(history_.GetInfo(&info2, true));
+}
+
} // namespace test
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698