| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright (c) 2012 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  163   bandwidth_observer_->OnReceivedRtcpReceiverReport(report_blocks, 50, time_ms); |  163   bandwidth_observer_->OnReceivedRtcpReceiverReport(report_blocks, 50, time_ms); | 
|  164   EXPECT_EQ(300000, bitrate_observer_.last_bitrate_); |  164   EXPECT_EQ(300000, bitrate_observer_.last_bitrate_); | 
|  165   time_ms += 1000; |  165   time_ms += 1000; | 
|  166  |  166  | 
|  167   report_blocks.clear(); |  167   report_blocks.clear(); | 
|  168   report_blocks.push_back(CreateReportBlock(1, 2, 0, 141)); |  168   report_blocks.push_back(CreateReportBlock(1, 2, 0, 141)); | 
|  169   bandwidth_observer_->OnReceivedRtcpReceiverReport(report_blocks, 50, time_ms); |  169   bandwidth_observer_->OnReceivedRtcpReceiverReport(report_blocks, 50, time_ms); | 
|  170   EXPECT_EQ(300000, bitrate_observer_.last_bitrate_); |  170   EXPECT_EQ(300000, bitrate_observer_.last_bitrate_); | 
|  171  |  171  | 
|  172   // Test that a low delay-based estimate limits the combined estimate. |  172   // Test that a low delay-based estimate limits the combined estimate. | 
|  173   controller_->UpdateDelayBasedEstimate(280000); |  173   controller_->OnReceiveBitrateChanged({0}, 280000); | 
|  174   EXPECT_EQ(280000, bitrate_observer_.last_bitrate_); |  174   EXPECT_EQ(280000, bitrate_observer_.last_bitrate_); | 
|  175  |  175  | 
|  176   // Test that a low REMB limits the combined estimate. |  176   // Test that a low REMB limits the combined estimate. | 
|  177   bandwidth_observer_->OnReceivedEstimatedBitrate(250000); |  177   bandwidth_observer_->OnReceivedEstimatedBitrate(250000); | 
|  178   EXPECT_EQ(250000, bitrate_observer_.last_bitrate_); |  178   EXPECT_EQ(250000, bitrate_observer_.last_bitrate_); | 
|  179   EXPECT_EQ(0, bitrate_observer_.last_fraction_loss_); |  179   EXPECT_EQ(0, bitrate_observer_.last_fraction_loss_); | 
|  180   EXPECT_EQ(50, bitrate_observer_.last_rtt_); |  180   EXPECT_EQ(50, bitrate_observer_.last_rtt_); | 
|  181  |  181  | 
|  182   bandwidth_observer_->OnReceivedEstimatedBitrate(1000); |  182   bandwidth_observer_->OnReceivedEstimatedBitrate(1000); | 
|  183   EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); |  183   EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); | 
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  399   EXPECT_EQ(120000, bitrate_observer_.last_bitrate_); |  399   EXPECT_EQ(120000, bitrate_observer_.last_bitrate_); | 
|  400   controller_->SetReservedBitrate(50000); |  400   controller_->SetReservedBitrate(50000); | 
|  401   bandwidth_observer_->OnReceivedEstimatedBitrate(120000); |  401   bandwidth_observer_->OnReceivedEstimatedBitrate(120000); | 
|  402   // Limited by min bitrate. |  402   // Limited by min bitrate. | 
|  403   EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); |  403   EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); | 
|  404  |  404  | 
|  405   controller_->SetReservedBitrate(10000); |  405   controller_->SetReservedBitrate(10000); | 
|  406   bandwidth_observer_->OnReceivedEstimatedBitrate(1); |  406   bandwidth_observer_->OnReceivedEstimatedBitrate(1); | 
|  407   EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); |  407   EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); | 
|  408 } |  408 } | 
| OLD | NEW |