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

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

Issue 2005313003: Propagate probing cluster id to SendTimeHistory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // packet, the truth[x].arrival_time and input[x].arrival_time may not be 85 // packet, the truth[x].arrival_time and input[x].arrival_time may not be
86 // equal. However, the difference must be the same for all x. 86 // equal. However, the difference must be the same for all x.
87 int64_t arrival_time_delta = 87 int64_t arrival_time_delta =
88 truth[0].arrival_time_ms - input[0].arrival_time_ms; 88 truth[0].arrival_time_ms - input[0].arrival_time_ms;
89 for (size_t i = 0; i < len; ++i) { 89 for (size_t i = 0; i < len; ++i) {
90 EXPECT_EQ(truth[i].arrival_time_ms, 90 EXPECT_EQ(truth[i].arrival_time_ms,
91 input[i].arrival_time_ms + arrival_time_delta); 91 input[i].arrival_time_ms + arrival_time_delta);
92 EXPECT_EQ(truth[i].send_time_ms, input[i].send_time_ms); 92 EXPECT_EQ(truth[i].send_time_ms, input[i].send_time_ms);
93 EXPECT_EQ(truth[i].sequence_number, input[i].sequence_number); 93 EXPECT_EQ(truth[i].sequence_number, input[i].sequence_number);
94 EXPECT_EQ(truth[i].payload_size, input[i].payload_size); 94 EXPECT_EQ(truth[i].payload_size, input[i].payload_size);
95 EXPECT_EQ(truth[i].was_paced, input[i].was_paced); 95 EXPECT_EQ(truth[i].probe_cluster_id, input[i].probe_cluster_id);
96 } 96 }
97 } 97 }
98 98
99 // Utility method, to reset arrival_time_ms before adding send time. 99 // Utility method, to reset arrival_time_ms before adding send time.
100 void OnSentPacket(PacketInfo info) { 100 void OnSentPacket(PacketInfo info) {
101 info.arrival_time_ms = 0; 101 info.arrival_time_ms = 0;
102 adapter_->AddPacket(info.sequence_number, info.payload_size, 102 adapter_->AddPacket(info.sequence_number, info.payload_size,
103 info.was_paced); 103 info.probe_cluster_id);
104 adapter_->OnSentPacket(info.sequence_number, info.send_time_ms); 104 adapter_->OnSentPacket(info.sequence_number, info.send_time_ms);
105 } 105 }
106 106
107 SimulatedClock clock_; 107 SimulatedClock clock_;
108 MockRemoteBitrateEstimator* bitrate_estimator_; 108 MockRemoteBitrateEstimator* bitrate_estimator_;
109 MockBitrateControllerAdapter bitrate_controller_; 109 MockBitrateControllerAdapter bitrate_controller_;
110 std::unique_ptr<TransportFeedbackAdapter> adapter_; 110 std::unique_ptr<TransportFeedbackAdapter> adapter_;
111 111
112 uint32_t receiver_estimated_bitrate_; 112 uint32_t receiver_estimated_bitrate_;
113 }; 113 };
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 })); 351 }));
352 adapter_->OnTransportFeedback(*feedback.get()); 352 adapter_->OnTransportFeedback(*feedback.get());
353 353
354 expected_packets.push_back(info); 354 expected_packets.push_back(info);
355 355
356 ComparePacketVectors(expected_packets, received_feedback); 356 ComparePacketVectors(expected_packets, received_feedback);
357 } 357 }
358 358
359 } // namespace test 359 } // namespace test
360 } // namespace webrtc 360 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698