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

Unified Diff: webrtc/modules/pacing/bitrate_prober_unittest.cc

Issue 2347023002: BitrateProber: Support higher probing bitrates (Closed)
Patch Set: addressed comments Created 4 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
Index: webrtc/modules/pacing/bitrate_prober_unittest.cc
diff --git a/webrtc/modules/pacing/bitrate_prober_unittest.cc b/webrtc/modules/pacing/bitrate_prober_unittest.cc
index 422bd27b686f38d466c3a8936caf65990d5a7004..38442337ea01112fd281fb4da364fb1ca09bbf8d 100644
--- a/webrtc/modules/pacing/bitrate_prober_unittest.cc
+++ b/webrtc/modules/pacing/bitrate_prober_unittest.cc
@@ -31,7 +31,7 @@ TEST(BitrateProberTest, VerifyStatesAndTimeBetweenProbes) {
// First packet should probe as soon as possible.
EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
- prober.PacketSent(now_ms, 1000);
+ prober.ProbeSent(now_ms, 1000);
for (int i = 0; i < 5; ++i) {
EXPECT_EQ(8, prober.TimeUntilNextProbe(now_ms));
@@ -40,14 +40,14 @@ TEST(BitrateProberTest, VerifyStatesAndTimeBetweenProbes) {
now_ms += 4;
EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
EXPECT_EQ(0, prober.CurrentClusterId());
- prober.PacketSent(now_ms, 1000);
+ prober.ProbeSent(now_ms, 1000);
}
for (int i = 0; i < 5; ++i) {
EXPECT_EQ(4, prober.TimeUntilNextProbe(now_ms));
now_ms += 4;
EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
EXPECT_EQ(1, prober.CurrentClusterId());
- prober.PacketSent(now_ms, 1000);
+ prober.ProbeSent(now_ms, 1000);
}
EXPECT_EQ(-1, prober.TimeUntilNextProbe(now_ms));
@@ -66,19 +66,19 @@ TEST(BitrateProberTest, DoesntProbeWithoutRecentPackets) {
prober.OnIncomingPacket(1000);
EXPECT_TRUE(prober.IsProbing());
EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
- prober.PacketSent(now_ms, 1000);
+ prober.ProbeSent(now_ms, 1000);
// Let time pass, no large enough packets put into prober.
now_ms += 6000;
EXPECT_EQ(-1, prober.TimeUntilNextProbe(now_ms));
// Insert a small packet, not a candidate for probing.
prober.OnIncomingPacket(100);
- prober.PacketSent(now_ms, 100);
+ EXPECT_FALSE(prober.IsProbing());
EXPECT_EQ(-1, prober.TimeUntilNextProbe(now_ms));
// Insert a large-enough packet after downtime while probing should reset to
// perform a new probe since the requested one didn't finish.
prober.OnIncomingPacket(1000);
EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
- prober.PacketSent(now_ms, 1000);
+ prober.ProbeSent(now_ms, 1000);
// Next packet should be part of new probe and be sent with non-zero delay.
prober.OnIncomingPacket(1000);
EXPECT_GT(prober.TimeUntilNextProbe(now_ms), 0);

Powered by Google App Engine
This is Rietveld 408576698