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

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

Issue 2714503002: Perform probing on network route change. (Closed)
Patch Set: Re-added const to |probe_controller_|. 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 PacketInfo info2(0, 0, packets[1].sequence_number, 0, 1); 232 PacketInfo info2(0, 0, packets[1].sequence_number, 0, 1);
233 EXPECT_TRUE(history_.GetInfo(&info2, true)); 233 EXPECT_TRUE(history_.GetInfo(&info2, true));
234 EXPECT_EQ(packets[1], info2); 234 EXPECT_EQ(packets[1], info2);
235 235
236 PacketInfo info3(0, 0, packets[2].sequence_number, 0, 2); 236 PacketInfo info3(0, 0, packets[2].sequence_number, 0, 2);
237 EXPECT_TRUE(history_.GetInfo(&info3, true)); 237 EXPECT_TRUE(history_.GetInfo(&info3, true));
238 EXPECT_EQ(packets[2], info3); 238 EXPECT_EQ(packets[2], info3);
239 } 239 }
240 240
241 TEST_F(SendTimeHistoryTest, Clear) {
242 const uint16_t kSeqNo = 1;
243 const int64_t kTimestamp = 2;
244 PacketInfo packets[] = {{0, kTimestamp, kSeqNo, 0, 0},
245 {0, kTimestamp + 1, kSeqNo + 1, 0, 1}};
246
247 AddPacketWithSendTime(packets[0].sequence_number, packets[0].payload_size,
248 packets[0].send_time_ms, 0);
249 AddPacketWithSendTime(packets[1].sequence_number, packets[1].payload_size,
250 packets[1].send_time_ms, 1);
251 PacketInfo info(0, 0, packets[0].sequence_number, 0, 0);
252 EXPECT_TRUE(history_.GetInfo(&info, true));
253 EXPECT_EQ(packets[0], info);
254
255 AddPacketWithSendTime(packets[2].sequence_number, packets[2].payload_size,
256 packets[2].send_time_ms, 2);
257
258 history_.Clear();
259
260 PacketInfo info2(0, 0, packets[1].sequence_number, 0, 1);
261 EXPECT_FALSE(history_.GetInfo(&info2, true));
262 }
263
241 } // namespace test 264 } // namespace test
242 } // namespace webrtc 265 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698