OLD | NEW |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 clock_.AdvanceTimeMilliseconds(2); | 123 clock_.AdvanceTimeMilliseconds(2); |
124 send_time_ms += 1; | 124 send_time_ms += 1; |
125 now_ms = clock_.TimeInMilliseconds(); | 125 now_ms = clock_.TimeInMilliseconds(); |
126 IncomingFeedback(now_ms, send_time_ms, seq_num++, 1000, kPacingInfo1); | 126 IncomingFeedback(now_ms, send_time_ms, seq_num++, 1000, kPacingInfo1); |
127 } | 127 } |
128 | 128 |
129 EXPECT_TRUE(bitrate_observer_.updated()); | 129 EXPECT_TRUE(bitrate_observer_.updated()); |
130 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), 4000000u, 10000u); | 130 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), 4000000u, 10000u); |
131 } | 131 } |
132 | 132 |
133 TEST_F(DelayBasedBweTest, GetProbingInterval) { | 133 TEST_F(DelayBasedBweTest, GetExpectedBwePeriodMs) { |
134 int64_t default_interval_ms = bitrate_estimator_->GetProbingIntervalMs(); | 134 int64_t default_interval_ms = bitrate_estimator_->GetExpectedBwePeriodMs(); |
135 EXPECT_GT(default_interval_ms, 0); | 135 EXPECT_GT(default_interval_ms, 0); |
136 CapacityDropTestHelper(1, true, 333, 0); | 136 CapacityDropTestHelper(1, true, 333, 0); |
137 int64_t interval_ms = bitrate_estimator_->GetProbingIntervalMs(); | 137 int64_t interval_ms = bitrate_estimator_->GetExpectedBwePeriodMs(); |
138 EXPECT_GT(interval_ms, 0); | 138 EXPECT_GT(interval_ms, 0); |
139 EXPECT_NE(interval_ms, default_interval_ms); | 139 EXPECT_NE(interval_ms, default_interval_ms); |
140 } | 140 } |
141 | 141 |
142 TEST_F(DelayBasedBweTest, InitialBehavior) { | 142 TEST_F(DelayBasedBweTest, InitialBehavior) { |
143 InitialBehaviorTestHelper(674840); | 143 InitialBehaviorTestHelper(674840); |
144 } | 144 } |
145 | 145 |
146 TEST_F(DelayBasedBweTest, RateIncreaseReordering) { | 146 TEST_F(DelayBasedBweTest, RateIncreaseReordering) { |
147 RateIncreaseReorderingTestHelper(674840); | 147 RateIncreaseReorderingTestHelper(674840); |
(...skipping 30 matching lines...) Expand all Loading... |
178 | 178 |
179 TEST_F(DelayBasedBweTest, TestLongTimeoutAndWrap) { | 179 TEST_F(DelayBasedBweTest, TestLongTimeoutAndWrap) { |
180 // Simulate a client leaving and rejoining the call after some multiple of | 180 // Simulate a client leaving and rejoining the call after some multiple of |
181 // 64 seconds later. This will cause a zero difference in abs send times due | 181 // 64 seconds later. This will cause a zero difference in abs send times due |
182 // to the wrap, but a big difference in arrival time, if streams aren't | 182 // to the wrap, but a big difference in arrival time, if streams aren't |
183 // properly timed out. | 183 // properly timed out. |
184 TestWrappingHelper(10 * 64); | 184 TestWrappingHelper(10 * 64); |
185 } | 185 } |
186 | 186 |
187 } // namespace webrtc | 187 } // namespace webrtc |
OLD | NEW |