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

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

Issue 2948763002: Allow an external audio processing module to be used in WebRTC (Closed)
Patch Set: tracking linux32_rel issue Created 3 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 } 63 }
64 64
65 TEST_F(SendTimeHistoryTest, AddRemoveOne) { 65 TEST_F(SendTimeHistoryTest, AddRemoveOne) {
66 const uint16_t kSeqNo = 10; 66 const uint16_t kSeqNo = 10;
67 // TODO(philipel): Fix PacedPacketInfo constructor? 67 // TODO(philipel): Fix PacedPacketInfo constructor?
68 const PacedPacketInfo kPacingInfo(0, 5, 1200); 68 const PacedPacketInfo kPacingInfo(0, 5, 1200);
69 const PacketFeedback kSentPacket(0, 1, kSeqNo, 1, kPacingInfo); 69 const PacketFeedback kSentPacket(0, 1, kSeqNo, 1, kPacingInfo);
70 AddPacketWithSendTime(kSeqNo, 1, 1, kPacingInfo); 70 AddPacketWithSendTime(kSeqNo, 1, 1, kPacingInfo);
71 71
72 PacketFeedback received_packet(0, 0, kSeqNo, 0, kPacingInfo); 72 PacketFeedback received_packet(0, 665, kSeqNo, 101, kPacingInfo);
73 EXPECT_TRUE(history_.GetFeedback(&received_packet, false)); 73 EXPECT_TRUE(history_.GetFeedback(&received_packet, false));
74 EXPECT_EQ(kSentPacket, received_packet); 74 EXPECT_EQ(kSentPacket, received_packet);
75 75
76 PacketFeedback received_packet2(0, 0, kSeqNo, 0, kPacingInfo); 76 PacketFeedback received_packet2(0, 0, kSeqNo, 0, kPacingInfo);
77 EXPECT_TRUE(history_.GetFeedback(&received_packet2, true)); 77 EXPECT_TRUE(history_.GetFeedback(&received_packet2, true));
78 EXPECT_EQ(kSentPacket, received_packet2); 78 EXPECT_EQ(kSentPacket, received_packet2);
79 79
80 PacketFeedback received_packet3(0, 0, kSeqNo, 0, kPacingInfo); 80 PacketFeedback received_packet3(0, 0, kSeqNo, 0, kPacingInfo);
81 EXPECT_FALSE(history_.GetFeedback(&received_packet3, true)); 81 EXPECT_FALSE(history_.GetFeedback(&received_packet3, true));
82 } 82 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 PacketFeedback packet2(0, 0, packets[1].sequence_number, 0, kPacingInfo1); 226 PacketFeedback packet2(0, 0, packets[1].sequence_number, 0, kPacingInfo1);
227 EXPECT_TRUE(history_.GetFeedback(&packet2, true)); 227 EXPECT_TRUE(history_.GetFeedback(&packet2, true));
228 EXPECT_EQ(packets[1], packet2); 228 EXPECT_EQ(packets[1], packet2);
229 229
230 PacketFeedback packet3(0, 0, packets[2].sequence_number, 0, kPacingInfo2); 230 PacketFeedback packet3(0, 0, packets[2].sequence_number, 0, kPacingInfo2);
231 EXPECT_TRUE(history_.GetFeedback(&packet3, true)); 231 EXPECT_TRUE(history_.GetFeedback(&packet3, true));
232 EXPECT_EQ(packets[2], packet3); 232 EXPECT_EQ(packets[2], packet3);
233 } 233 }
234 } // namespace test 234 } // namespace test
235 } // namespace webrtc 235 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698