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

Unified Diff: webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc

Issue 2254733005: Only use payload size within the receive/send interval for bitrate probing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Keep track of the size of the last/first sent/receive packet. Created 4 years, 4 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/congestion_controller/probe_bitrate_estimator_unittest.cc
diff --git a/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc b/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc
index e3bbd5a22793e2d8a73c0a277ae02f9fc036acb9..f09de1dc57227341d995bdbd8fc9dc5bc4b45792 100644
--- a/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc
+++ b/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc
@@ -125,4 +125,26 @@ TEST_F(TestProbeBitrateEstimator, OldProbe) {
EXPECT_EQ(1ul, results_.size());
}
+TEST_F(TestProbeBitrateEstimator, IgnoreSizeLastSendPacket) {
+ AddPacketFeedback(0, 1000, 0, 10);
+ AddPacketFeedback(0, 1000, 10, 20);
+ AddPacketFeedback(0, 1000, 20, 30);
+ AddPacketFeedback(0, 1000, 30, 40);
+ AddPacketFeedback(0, 1500, 40, 50);
danilchap 2016/08/22 13:53:35 May be add note that increased packet size increas
philipel 2016/08/22 14:06:40 Acknowledged.
+
+ CheckResult(0, 800000, 10, 40);
danilchap 2016/08/22 13:53:35 May be add a note that 1st CheckResult check bitra
philipel 2016/08/22 14:06:40 Acknowledged.
+ CheckResult(1, 800000, 10, 50);
+}
+
+TEST_F(TestProbeBitrateEstimator, IgnoreSizeFirstReceivePacket) {
+ AddPacketFeedback(0, 1500, 0, 10);
+ AddPacketFeedback(0, 1000, 10, 20);
+ AddPacketFeedback(0, 1000, 20, 30);
+ AddPacketFeedback(0, 1000, 30, 40);
+ AddPacketFeedback(0, 1000, 40, 50);
+
+ CheckResult(0, 800000, 10, 40);
danilchap 2016/08/22 13:53:35 does it make sense to CheckResult twice in this te
philipel 2016/08/22 14:06:40 Copy-paste ftw :) But no, it doesn't.
+ CheckResult(1, 800000, 10, 50);
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698