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

Side by Side Diff: webrtc/modules/congestion_controller/transport_feedback_adapter_unittest.cc

Issue 2638083002: Attach TransportFeedbackPacketLossTracker to ANA (PLR only) (Closed)
Patch Set: Fix UT Created 3 years, 10 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 EXPECT_EQ(truth[i].send_time_ms, input[i].send_time_ms); 83 EXPECT_EQ(truth[i].send_time_ms, input[i].send_time_ms);
84 EXPECT_EQ(truth[i].sequence_number, input[i].sequence_number); 84 EXPECT_EQ(truth[i].sequence_number, input[i].sequence_number);
85 EXPECT_EQ(truth[i].payload_size, input[i].payload_size); 85 EXPECT_EQ(truth[i].payload_size, input[i].payload_size);
86 EXPECT_EQ(truth[i].probe_cluster_id, input[i].probe_cluster_id); 86 EXPECT_EQ(truth[i].probe_cluster_id, input[i].probe_cluster_id);
87 } 87 }
88 } 88 }
89 89
90 // Utility method, to reset arrival_time_ms before adding send time. 90 // Utility method, to reset arrival_time_ms before adding send time.
91 void OnSentPacket(PacketInfo info) { 91 void OnSentPacket(PacketInfo info) {
92 info.arrival_time_ms = 0; 92 info.arrival_time_ms = 0;
93 adapter_->AddPacket(info.sequence_number, info.payload_size, 93 adapter_->AddPacket(0, info.sequence_number, info.payload_size,
94 info.probe_cluster_id); 94 info.probe_cluster_id);
95 adapter_->OnSentPacket(info.sequence_number, info.send_time_ms); 95 adapter_->OnSentPacket(info.sequence_number, info.send_time_ms);
96 } 96 }
97 97
98 SimulatedClock clock_; 98 SimulatedClock clock_;
99 MockBitrateControllerAdapter bitrate_controller_; 99 MockBitrateControllerAdapter bitrate_controller_;
100 std::unique_ptr<TransportFeedbackAdapter> adapter_; 100 std::unique_ptr<TransportFeedbackAdapter> adapter_;
101 101
102 uint32_t target_bitrate_bps_; 102 uint32_t target_bitrate_bps_;
103 }; 103 };
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 EXPECT_TRUE(feedback.get() != nullptr); 346 EXPECT_TRUE(feedback.get() != nullptr);
347 adapter_->OnTransportFeedback(*feedback.get()); 347 adapter_->OnTransportFeedback(*feedback.get());
348 clock_.AdvanceTimeMilliseconds(50); 348 clock_.AdvanceTimeMilliseconds(50);
349 ++seq_num; 349 ++seq_num;
350 } 350 }
351 EXPECT_GT(target_bitrate_bps_, 0u); 351 EXPECT_GT(target_bitrate_bps_, 0u);
352 } 352 }
353 353
354 } // namespace test 354 } // namespace test
355 } // namespace webrtc 355 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698