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

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

Issue 1946173002: Bitrate prober now keep track of probing cluster id. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed commented code. Created 4 years, 8 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 59ee479973d30bcc5e8fc6b161105dc60c60a50c..40e94cfc1b2b093ae038c0151c925a4035bf4bc5 100644
--- a/webrtc/modules/pacing/bitrate_prober_unittest.cc
+++ b/webrtc/modules/pacing/bitrate_prober_unittest.cc
@@ -23,9 +23,11 @@ TEST(BitrateProberTest, VerifyStatesAndTimeBetweenProbes) {
prober.SetEnabled(true);
EXPECT_FALSE(prober.IsProbing());
+ EXPECT_EQ(-1, prober.CurrentClusterId());
prober.OnIncomingPacket(300000, 1000, now_ms);
EXPECT_TRUE(prober.IsProbing());
+ EXPECT_EQ(0, prober.CurrentClusterId());
// First packet should probe as soon as possible.
EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
@@ -37,15 +39,18 @@ TEST(BitrateProberTest, VerifyStatesAndTimeBetweenProbes) {
EXPECT_EQ(4, prober.TimeUntilNextProbe(now_ms));
now_ms += 4;
EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
+ EXPECT_EQ(0, prober.CurrentClusterId());
prober.PacketSent(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);
}
+ EXPECT_EQ(-1, prober.CurrentClusterId());
EXPECT_EQ(-1, prober.TimeUntilNextProbe(now_ms));
EXPECT_FALSE(prober.IsProbing());
}
« webrtc/modules/pacing/bitrate_prober.cc ('K') | « webrtc/modules/pacing/bitrate_prober.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698