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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 send_time_ms += 1; | 132 send_time_ms += 1; |
133 now_ms = clock_.TimeInMilliseconds(); | 133 now_ms = clock_.TimeInMilliseconds(); |
134 IncomingFeedback(now_ms, send_time_ms, seq_num++, 1000, kPacingInfo1); | 134 IncomingFeedback(now_ms, send_time_ms, seq_num++, 1000, kPacingInfo1); |
135 } | 135 } |
136 | 136 |
137 EXPECT_TRUE(bitrate_observer_.updated()); | 137 EXPECT_TRUE(bitrate_observer_.updated()); |
138 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), | 138 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), |
139 kTargetUtilizationFraction * 4000000u, 10000u); | 139 kTargetUtilizationFraction * 4000000u, 10000u); |
140 } | 140 } |
141 | 141 |
| 142 TEST_F(DelayBasedBweTest, GetExpectedBwePeriodMs) { |
| 143 int64_t default_interval_ms = bitrate_estimator_->GetExpectedBwePeriodMs(); |
| 144 EXPECT_GT(default_interval_ms, 0); |
| 145 CapacityDropTestHelper(1, true, 333, 0); |
| 146 int64_t interval_ms = bitrate_estimator_->GetExpectedBwePeriodMs(); |
| 147 EXPECT_GT(interval_ms, 0); |
| 148 EXPECT_NE(interval_ms, default_interval_ms); |
| 149 } |
| 150 |
142 TEST_F(DelayBasedBweTest, InitialBehavior) { | 151 TEST_F(DelayBasedBweTest, InitialBehavior) { |
143 InitialBehaviorTestHelper(730000); | 152 InitialBehaviorTestHelper(730000); |
144 } | 153 } |
145 | 154 |
146 TEST_F(DelayBasedBweTest, RateIncreaseReordering) { | 155 TEST_F(DelayBasedBweTest, RateIncreaseReordering) { |
147 RateIncreaseReorderingTestHelper(730000); | 156 RateIncreaseReorderingTestHelper(730000); |
148 } | 157 } |
149 TEST_F(DelayBasedBweTest, RateIncreaseRtpTimestamps) { | 158 TEST_F(DelayBasedBweTest, RateIncreaseRtpTimestamps) { |
150 RateIncreaseRtpTimestampsTestHelper(627); | 159 RateIncreaseRtpTimestampsTestHelper(627); |
151 } | 160 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } else if (bitrate_observer_.updated()) { | 225 } else if (bitrate_observer_.updated()) { |
217 bitrate_bps = bitrate_observer_.latest_bitrate(); | 226 bitrate_bps = bitrate_observer_.latest_bitrate(); |
218 bitrate_observer_.Reset(); | 227 bitrate_observer_.Reset(); |
219 } | 228 } |
220 } | 229 } |
221 EXPECT_TRUE(seen_overuse); | 230 EXPECT_TRUE(seen_overuse); |
222 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), kStartBitrate / 2, 15000); | 231 EXPECT_NEAR(bitrate_observer_.latest_bitrate(), kStartBitrate / 2, 15000); |
223 } | 232 } |
224 | 233 |
225 } // namespace webrtc | 234 } // namespace webrtc |
OLD | NEW |