Index: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc |
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc |
index f9588096a070226e1d4cc18e9e68bc07c9d1d5f8..c9f0dde58dca7c996d660a76d718963e743568e4 100644 |
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc |
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc |
@@ -231,7 +231,7 @@ void RemoteBitrateEstimatorTest::IncomingPacket(uint32_t ssrc, |
header.timestamp = rtp_timestamp; |
header.extension.hasAbsoluteSendTime = true; |
header.extension.absoluteSendTime = absolute_send_time; |
- bitrate_estimator_->IncomingPacket(arrival_time + kArrivalTimeClockOffsetMs, |
+ bitrate_estimator_->IncomingPacket(arrival_time + arrival_time_offset_ms_, |
payload_size, header); |
} |
@@ -429,7 +429,8 @@ void RemoteBitrateEstimatorTest::RateIncreaseRtpTimestampsTestHelper( |
void RemoteBitrateEstimatorTest::CapacityDropTestHelper( |
int number_of_streams, |
bool wrap_time_stamp, |
- uint32_t expected_bitrate_drop_delta) { |
+ uint32_t expected_bitrate_drop_delta, |
+ int64_t receiver_clock_offset_change_ms) { |
const int kFramerate = 30; |
const int kStartBitrate = 900e3; |
const int kMinExpectedBitrate = 800e3; |
@@ -477,6 +478,9 @@ void RemoteBitrateEstimatorTest::CapacityDropTestHelper( |
EXPECT_NEAR(kInitialCapacityBps, bitrate_bps, 130000u); |
bitrate_observer_->Reset(); |
+ // Add an offset to make sure the BWE can handle it. |
+ arrival_time_offset_ms_ += receiver_clock_offset_change_ms; |
+ |
// Reduce the capacity and verify the decrease time. |
stream_generator_->set_capacity_bps(kReducedCapacityBps); |
int64_t overuse_start_time = clock_.TimeInMilliseconds(); |