| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "webrtc/call/mock/mock_rtc_event_log.h" | 14 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" |
| 15 #include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h" | 15 #include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h" |
| 16 #include "webrtc/test/gtest.h" | 16 #include "webrtc/test/gtest.h" |
| 17 | 17 |
| 18 namespace webrtc { | 18 namespace webrtc { |
| 19 | 19 |
| 20 void TestProbing(bool use_delay_based) { | 20 void TestProbing(bool use_delay_based) { |
| 21 MockRtcEventLog event_log; | 21 MockRtcEventLog event_log; |
| 22 SendSideBandwidthEstimation bwe(&event_log); | 22 SendSideBandwidthEstimation bwe(&event_log); |
| 23 bwe.SetMinMaxBitrate(100000, 1500000); | 23 bwe.SetMinMaxBitrate(100000, 1500000); |
| 24 bwe.SetSendBitrate(200000); | 24 bwe.SetSendBitrate(200000); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 bwe.UpdateEstimate(now_ms); | 111 bwe.UpdateEstimate(now_ms); |
| 112 bwe.CurrentEstimate(&bitrate_bps, &fraction_loss, &rtt_ms); | 112 bwe.CurrentEstimate(&bitrate_bps, &fraction_loss, &rtt_ms); |
| 113 | 113 |
| 114 EXPECT_EQ(last_bitrate_bps, bitrate_bps); | 114 EXPECT_EQ(last_bitrate_bps, bitrate_bps); |
| 115 // The old loss rate should still be applied though. | 115 // The old loss rate should still be applied though. |
| 116 EXPECT_EQ(kFractionLoss, fraction_loss); | 116 EXPECT_EQ(kFractionLoss, fraction_loss); |
| 117 EXPECT_EQ(kRttMs, rtt_ms); | 117 EXPECT_EQ(kRttMs, rtt_ms); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace webrtc | 120 } // namespace webrtc |
| OLD | NEW |