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

Side by Side Diff: webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc

Issue 2789233005: Move BWE period calculation from ProbingIntervalEstimator to AimdRateControl. (Closed)
Patch Set: Remove unused include. Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 clock_.AdvanceTimeMilliseconds(2); 109 clock_.AdvanceTimeMilliseconds(2);
110 send_time_ms += 1; 110 send_time_ms += 1;
111 now_ms = clock_.TimeInMilliseconds(); 111 now_ms = clock_.TimeInMilliseconds();
112 IncomingFeedback(now_ms, send_time_ms, seq_num++, 1000, kPacingInfo1); 112 IncomingFeedback(now_ms, send_time_ms, seq_num++, 1000, kPacingInfo1);
113 } 113 }
114 114
115 EXPECT_TRUE(bitrate_observer_.updated()); 115 EXPECT_TRUE(bitrate_observer_.updated());
116 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), 4000000u, 10000u); 116 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), 4000000u, 10000u);
117 } 117 }
118 118
119 TEST_F(DelayBasedBweTest, GetProbingInterval) { 119 TEST_F(DelayBasedBweTest, GetExpectedBwePeriodMs) {
120 int64_t default_interval_ms = bitrate_estimator_->GetProbingIntervalMs(); 120 int64_t default_interval_ms = bitrate_estimator_->GetExpectedBwePeriodMs();
121 EXPECT_GT(default_interval_ms, 0); 121 EXPECT_GT(default_interval_ms, 0);
122 CapacityDropTestHelper(1, true, 333, 0); 122 CapacityDropTestHelper(1, true, 333, 0);
123 int64_t interval_ms = bitrate_estimator_->GetProbingIntervalMs(); 123 int64_t interval_ms = bitrate_estimator_->GetExpectedBwePeriodMs();
124 EXPECT_GT(interval_ms, 0); 124 EXPECT_GT(interval_ms, 0);
125 EXPECT_NE(interval_ms, default_interval_ms); 125 EXPECT_NE(interval_ms, default_interval_ms);
126 } 126 }
127 127
128 TEST_F(DelayBasedBweTest, InitialBehavior) { 128 TEST_F(DelayBasedBweTest, InitialBehavior) {
129 InitialBehaviorTestHelper(674840); 129 InitialBehaviorTestHelper(674840);
130 } 130 }
131 131
132 TEST_F(DelayBasedBweTest, RateIncreaseReordering) { 132 TEST_F(DelayBasedBweTest, RateIncreaseReordering) {
133 RateIncreaseReorderingTestHelper(674840); 133 RateIncreaseReorderingTestHelper(674840);
(...skipping 30 matching lines...) Expand all
164 164
165 TEST_F(DelayBasedBweTest, TestLongTimeoutAndWrap) { 165 TEST_F(DelayBasedBweTest, TestLongTimeoutAndWrap) {
166 // Simulate a client leaving and rejoining the call after some multiple of 166 // Simulate a client leaving and rejoining the call after some multiple of
167 // 64 seconds later. This will cause a zero difference in abs send times due 167 // 64 seconds later. This will cause a zero difference in abs send times due
168 // to the wrap, but a big difference in arrival time, if streams aren't 168 // to the wrap, but a big difference in arrival time, if streams aren't
169 // properly timed out. 169 // properly timed out.
170 TestWrappingHelper(10 * 64); 170 TestWrappingHelper(10 * 64);
171 } 171 }
172 172
173 } // namespace webrtc 173 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698