| Index: webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
|
| diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
|
| index 36d72753a0e92bd54675583a9fa707c8f7c8176f..7f97f2a33d476a543d5fadcef71a630371f431d3 100644
|
| --- a/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
|
| +++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
|
| @@ -17,27 +17,43 @@ namespace testing {
|
| namespace bwe {
|
| TEST(MaxBandwidthFilterTest, InitializationCheck) {
|
| MaxBandwidthFilter max_bandwidth_filter;
|
| - EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bytes_per_ms(), 0);
|
| + EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 0);
|
| }
|
|
|
| TEST(MaxBandwidthFilterTest, AddOneBandwidthSample) {
|
| MaxBandwidthFilter max_bandwidth_filter;
|
| max_bandwidth_filter.AddBandwidthSample(13, 4, 10);
|
| - EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bytes_per_ms(), 13);
|
| + EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 13);
|
| }
|
|
|
| TEST(MaxBandwidthFilterTest, AddSeveralBandwidthSamples) {
|
| MaxBandwidthFilter max_bandwidth_filter;
|
| max_bandwidth_filter.AddBandwidthSample(10, 5, 10);
|
| max_bandwidth_filter.AddBandwidthSample(13, 6, 10);
|
| - EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bytes_per_ms(), 13);
|
| + EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 13);
|
| }
|
|
|
| -TEST(MaxBandwidthFilterTest, SampleTimeOut) {
|
| +TEST(MaxBandwidthFilterTest, FirstSampleTimeOut) {
|
| MaxBandwidthFilter max_bandwidth_filter;
|
| max_bandwidth_filter.AddBandwidthSample(13, 5, 10);
|
| max_bandwidth_filter.AddBandwidthSample(10, 15, 10);
|
| - EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bytes_per_ms(), 10);
|
| + EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 10);
|
| +}
|
| +
|
| +TEST(MaxBandwidthFilterTest, SecondSampleBecomesTheFirst) {
|
| + MaxBandwidthFilter max_bandwidth_filter;
|
| + max_bandwidth_filter.AddBandwidthSample(4, 5, 10);
|
| + max_bandwidth_filter.AddBandwidthSample(3, 10, 10);
|
| + max_bandwidth_filter.AddBandwidthSample(2, 15, 10);
|
| + EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 3);
|
| +}
|
| +
|
| +TEST(MaxBandwidthFilterTest, ThirdSampleBecomesTheFirst) {
|
| + MaxBandwidthFilter max_bandwidth_filter;
|
| + max_bandwidth_filter.AddBandwidthSample(4, 5, 10);
|
| + max_bandwidth_filter.AddBandwidthSample(3, 10, 10);
|
| + max_bandwidth_filter.AddBandwidthSample(2, 25, 10);
|
| + EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 2);
|
| }
|
|
|
| TEST(MaxBandwidthFilterTest, FullBandwidthReached) {
|
|
|