| OLD | NEW |
| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 PacketFeedback packet2(0, 0, packets[1].sequence_number, 0, kPacingInfo1); | 207 PacketFeedback packet2(0, 0, packets[1].sequence_number, 0, kPacingInfo1); |
| 208 EXPECT_TRUE(history_.GetFeedback(&packet2, true)); | 208 EXPECT_TRUE(history_.GetFeedback(&packet2, true)); |
| 209 EXPECT_EQ(packets[1], packet2); | 209 EXPECT_EQ(packets[1], packet2); |
| 210 | 210 |
| 211 PacketFeedback packet3(0, 0, packets[2].sequence_number, 0, kPacingInfo2); | 211 PacketFeedback packet3(0, 0, packets[2].sequence_number, 0, kPacingInfo2); |
| 212 EXPECT_TRUE(history_.GetFeedback(&packet3, true)); | 212 EXPECT_TRUE(history_.GetFeedback(&packet3, true)); |
| 213 EXPECT_EQ(packets[2], packet3); | 213 EXPECT_EQ(packets[2], packet3); |
| 214 } | 214 } |
| 215 | 215 |
| 216 TEST_F(SendTimeHistoryTest, Clear) { |
| 217 const uint16_t kSeqNo = 1; |
| 218 const int64_t kTimestamp = 2; |
| 219 const PacedPacketInfo kPacingInfo(0, 5, 1200); |
| 220 |
| 221 PacketFeedback packets[] = {{0, kTimestamp, kSeqNo, 0, kPacingInfo}, |
| 222 {0, kTimestamp + 1, kSeqNo + 1, 0, kPacingInfo}}; |
| 223 |
| 224 AddPacketWithSendTime(packets[0].sequence_number, packets[0].payload_size, |
| 225 packets[0].send_time_ms, kPacingInfo); |
| 226 AddPacketWithSendTime(packets[1].sequence_number, packets[1].payload_size, |
| 227 packets[1].send_time_ms, kPacingInfo); |
| 228 PacketFeedback info(0, 0, packets[0].sequence_number, 0, kPacingInfo); |
| 229 EXPECT_TRUE(history_.GetFeedback(&info, true)); |
| 230 EXPECT_EQ(packets[0], info); |
| 231 |
| 232 history_.Clear(); |
| 233 |
| 234 PacketFeedback info2(0, 0, packets[1].sequence_number, 0, kPacingInfo); |
| 235 EXPECT_FALSE(history_.GetFeedback(&info2, true)); |
| 236 } |
| 237 |
| 216 } // namespace test | 238 } // namespace test |
| 217 } // namespace webrtc | 239 } // namespace webrtc |
| OLD | NEW |