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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc

Issue 2999073002: Tweaked version of BBR for WebRTC. (Closed)
Patch Set: Updated according to comments. Created 3 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/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc
index 0c6d59cbc6a666a894897a058e1c562e38b39736..2415c137acde2f6c875d81b2c3f37121675479f6 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc
@@ -17,9 +17,8 @@ namespace webrtc {
namespace testing {
namespace bwe {
namespace {
-// These are the same values used in CongestionWindow class.
+// Same value used in CongestionWindow class.
const int64_t kStartingCongestionWindow = 6000;
-const int64_t kMinimumCongestionWindow = 4000;
} // namespace
TEST(CongestionWindowTest, InitializationCheck) {
@@ -51,33 +50,13 @@ TEST(CongestionWindowTest, ZeroBandwidthDelayProduct) {
EXPECT_EQ(target_congestion_window, 2.885f * kStartingCongestionWindow);
}
-TEST(CongestionWindowTest, BelowMinimumTargetCongestionWindow) {
- CongestionWindow congestion_window;
- int64_t target_congestion_window =
- congestion_window.GetTargetCongestionWindow(
- 100, rtc::Optional<int64_t>(2), 2.885f);
- EXPECT_EQ(target_congestion_window, kMinimumCongestionWindow);
-}
-
-TEST(CongestionWindowTest, AboveMinimumTargetCongestionWindow) {
- CongestionWindow congestion_window;
- int64_t target_congestion_window =
- congestion_window.GetTargetCongestionWindow(
- 100000, rtc::Optional<int64_t>(2), 2.885f);
- EXPECT_EQ(target_congestion_window, 577000);
-}
-
-TEST(CongestionWindowTest, MinimumCongestionWindow) {
- CongestionWindow congestion_window;
- int64_t cwnd = congestion_window.GetCongestionWindow(
- BbrBweSender::PROBE_RTT, 100, rtc::Optional<int64_t>(100), 2.885f);
- EXPECT_EQ(cwnd, kMinimumCongestionWindow);
-}
-
TEST(CongestionWindowTest, CalculateCongestionWindow) {
CongestionWindow congestion_window;
int64_t cwnd = congestion_window.GetCongestionWindow(
- BbrBweSender::STARTUP, 100, rtc::Optional<int64_t>(100l), 2.885f);
+ BbrBweSender::STARTUP, 800000, rtc::Optional<int64_t>(100l), 2.885f);
+ EXPECT_EQ(cwnd, 28850);
+ cwnd = congestion_window.GetCongestionWindow(
+ BbrBweSender::STARTUP, 400000, rtc::Optional<int64_t>(200l), 2.885f);
EXPECT_EQ(cwnd, 28850);
}
} // namespace bwe

Powered by Google App Engine
This is Rietveld 408576698