Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Side by Side Diff: webrtc/modules/congestion_controller/delay_based_bwe_unittest_helper.h

Issue 2377303002: Revert of Fix race / crash in OnNetworkRouteChanged(). (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_UNITTEST_HELPER_H_ 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_UNITTEST_HELPER_H_
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_UNITTEST_HELPER_H_ 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_UNITTEST_HELPER_H_
13 13
14 #include <list> 14 #include <list>
15 #include <map> 15 #include <map>
16 #include <memory> 16 #include <memory>
17 #include <utility> 17 #include <utility>
18 #include <vector> 18 #include <vector>
19 19
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "webrtc/base/constructormagic.h" 21 #include "webrtc/base/constructormagic.h"
22 #include "webrtc/modules/congestion_controller/delay_based_bwe.h"
23 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" 22 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h"
24 #include "webrtc/system_wrappers/include/clock.h" 23 #include "webrtc/system_wrappers/include/clock.h"
25 24
26 namespace webrtc { 25 namespace webrtc {
27 namespace test { 26 namespace test {
28 27
29 class TestBitrateObserver : public RemoteBitrateObserver { 28 class TestBitrateObserver : public RemoteBitrateObserver {
30 public: 29 public:
31 TestBitrateObserver() : updated_(false), latest_bitrate_(0) {} 30 TestBitrateObserver() : updated_(false), latest_bitrate_(0) {}
32 virtual ~TestBitrateObserver() {} 31 virtual ~TestBitrateObserver() {}
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void RateIncreaseReorderingTestHelper(uint32_t expected_bitrate); 153 void RateIncreaseReorderingTestHelper(uint32_t expected_bitrate);
155 void RateIncreaseRtpTimestampsTestHelper(int expected_iterations); 154 void RateIncreaseRtpTimestampsTestHelper(int expected_iterations);
156 void CapacityDropTestHelper(int number_of_streams, 155 void CapacityDropTestHelper(int number_of_streams,
157 bool wrap_time_stamp, 156 bool wrap_time_stamp,
158 uint32_t expected_bitrate_drop_delta, 157 uint32_t expected_bitrate_drop_delta,
159 int64_t receiver_clock_offset_change_ms); 158 int64_t receiver_clock_offset_change_ms);
160 159
161 static const uint32_t kDefaultSsrc; 160 static const uint32_t kDefaultSsrc;
162 161
163 SimulatedClock clock_; // Time at the receiver. 162 SimulatedClock clock_; // Time at the receiver.
164 test::TestBitrateObserver bitrate_observer_; 163 std::unique_ptr<test::TestBitrateObserver> bitrate_observer_;
165 DelayBasedBwe bitrate_estimator_; 164 std::unique_ptr<RemoteBitrateEstimator> bitrate_estimator_;
166 std::unique_ptr<test::StreamGenerator> stream_generator_; 165 std::unique_ptr<test::StreamGenerator> stream_generator_;
167 int64_t arrival_time_offset_ms_; 166 int64_t arrival_time_offset_ms_;
168 167
169 RTC_DISALLOW_COPY_AND_ASSIGN(DelayBasedBweTest); 168 RTC_DISALLOW_COPY_AND_ASSIGN(DelayBasedBweTest);
170 }; 169 };
171 } // namespace webrtc 170 } // namespace webrtc
172 171
173 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_UNITTEST_HELPER_ H_ 172 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_UNITTEST_HELPER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698