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

Side by Side Diff: net/quic/quic_multipath_received_packet_manager_test.cc

Issue 1782143003: Remove FEC code from receive path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115997404
Patch Set: Created 4 years, 9 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
« no previous file with comments | « net/quic/quic_multipath_received_packet_manager.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_multipath_received_packet_manager.h" 5 #include "net/quic/quic_multipath_received_packet_manager.h"
6 6
7 #include "net/quic/quic_connection_stats.h" 7 #include "net/quic/quic_connection_stats.h"
8 #include "net/quic/test_tools/quic_test_utils.h" 8 #include "net/quic/test_tools/quic_test_utils.h"
9 #include "net/test/gtest_util.h" 9 #include "net/test/gtest_util.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 TEST_F(QuicMultipathReceivedPacketManagerTest, RecordPacketReceived) { 94 TEST_F(QuicMultipathReceivedPacketManagerTest, RecordPacketReceived) {
95 EXPECT_CALL(*manager_0_, RecordPacketReceived(_, _, _)).Times(1); 95 EXPECT_CALL(*manager_0_, RecordPacketReceived(_, _, _)).Times(1);
96 multipath_manager_.RecordPacketReceived(kDefaultPathId, kBytes, header_, 96 multipath_manager_.RecordPacketReceived(kDefaultPathId, kBytes, header_,
97 QuicTime::Zero()); 97 QuicTime::Zero());
98 EXPECT_DFATAL(multipath_manager_.RecordPacketReceived( 98 EXPECT_DFATAL(multipath_manager_.RecordPacketReceived(
99 kPathId2, kBytes, header_, QuicTime::Zero()), 99 kPathId2, kBytes, header_, QuicTime::Zero()),
100 "Received a packet on a non-existent path"); 100 "Received a packet on a non-existent path");
101 } 101 }
102 102
103 TEST_F(QuicMultipathReceivedPacketManagerTest, RecordPacketRevived) {
104 EXPECT_CALL(*manager_0_, RecordPacketRevived(_)).Times(1);
105 multipath_manager_.RecordPacketRevived(kDefaultPathId, header_.packet_number);
106 EXPECT_DFATAL(
107 multipath_manager_.RecordPacketRevived(kPathId2, header_.packet_number),
108 "Revived a packet on a non-existent path");
109 }
110
111 TEST_F(QuicMultipathReceivedPacketManagerTest, IsMissing) { 103 TEST_F(QuicMultipathReceivedPacketManagerTest, IsMissing) {
112 EXPECT_CALL(*manager_0_, IsMissing(header_.packet_number)) 104 EXPECT_CALL(*manager_0_, IsMissing(header_.packet_number))
113 .WillOnce(Return(true)); 105 .WillOnce(Return(true));
114 EXPECT_CALL(*manager_1_, IsMissing(header_.packet_number)) 106 EXPECT_CALL(*manager_1_, IsMissing(header_.packet_number))
115 .WillOnce(Return(false)); 107 .WillOnce(Return(false));
116 EXPECT_TRUE( 108 EXPECT_TRUE(
117 multipath_manager_.IsMissing(kDefaultPathId, header_.packet_number)); 109 multipath_manager_.IsMissing(kDefaultPathId, header_.packet_number));
118 EXPECT_FALSE(multipath_manager_.IsMissing(kPathId1, header_.packet_number)); 110 EXPECT_FALSE(multipath_manager_.IsMissing(kPathId1, header_.packet_number));
119 EXPECT_DFATAL(multipath_manager_.IsMissing(kPathId2, header_.packet_number), 111 EXPECT_DFATAL(multipath_manager_.IsMissing(kPathId2, header_.packet_number),
120 "Check whether a packet is missing on a non-existent path"); 112 "Check whether a packet is missing on a non-existent path");
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 EXPECT_CALL(*manager_1_, HasNewMissingPackets()).WillOnce(Return(false)); 167 EXPECT_CALL(*manager_1_, HasNewMissingPackets()).WillOnce(Return(false));
176 EXPECT_TRUE(multipath_manager_.HasNewMissingPackets(kDefaultPathId)); 168 EXPECT_TRUE(multipath_manager_.HasNewMissingPackets(kDefaultPathId));
177 EXPECT_FALSE(multipath_manager_.HasNewMissingPackets(kPathId1)); 169 EXPECT_FALSE(multipath_manager_.HasNewMissingPackets(kPathId1));
178 EXPECT_DFATAL(multipath_manager_.HasNewMissingPackets(kPathId2), 170 EXPECT_DFATAL(multipath_manager_.HasNewMissingPackets(kPathId2),
179 "Check whether has new missing packets on a non-existent path"); 171 "Check whether has new missing packets on a non-existent path");
180 } 172 }
181 173
182 } // namespace 174 } // namespace
183 } // namespace test 175 } // namespace test
184 } // namespace net 176 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_multipath_received_packet_manager.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698