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

Side by Side Diff: net/tools/quic/quic_time_wait_list_manager_test.cc

Issue 2808273006: Landing Recent QUIC changes until Sun Apr 9 16:12:55 (Closed)
Patch Set: increment enabled_options in e2e test Created 3 years, 8 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/tools/quic/quic_dispatcher_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tools/quic/quic_time_wait_list_manager.h" 5 #include "net/tools/quic/quic_time_wait_list_manager.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <memory> 8 #include <memory>
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 const std::tr1::tuple<const char*, int> packet_buffer, 152 const std::tr1::tuple<const char*, int> packet_buffer,
153 testing::MatchResultListener* /* listener */) const override { 153 testing::MatchResultListener* /* listener */) const override {
154 FramerVisitorCapturingPublicReset visitor; 154 FramerVisitorCapturingPublicReset visitor;
155 QuicFramer framer(AllSupportedVersions(), QuicTime::Zero(), 155 QuicFramer framer(AllSupportedVersions(), QuicTime::Zero(),
156 Perspective::IS_CLIENT); 156 Perspective::IS_CLIENT);
157 framer.set_visitor(&visitor); 157 framer.set_visitor(&visitor);
158 QuicEncryptedPacket encrypted(std::tr1::get<0>(packet_buffer), 158 QuicEncryptedPacket encrypted(std::tr1::get<0>(packet_buffer),
159 std::tr1::get<1>(packet_buffer)); 159 std::tr1::get<1>(packet_buffer));
160 framer.ProcessPacket(encrypted); 160 framer.ProcessPacket(encrypted);
161 QuicPublicResetPacket packet = visitor.public_reset_packet(); 161 QuicPublicResetPacket packet = visitor.public_reset_packet();
162 return connection_id_ == packet.public_header.connection_id && 162 return connection_id_ == GetPeerInMemoryConnectionId(
163 packet.public_header.connection_id) &&
163 packet.public_header.reset_flag && 164 packet.public_header.reset_flag &&
164 !packet.public_header.version_flag && 165 !packet.public_header.version_flag &&
165 packet_number_ == packet.rejected_packet_number && 166 packet_number_ == packet.rejected_packet_number &&
166 net::test::TestPeerIPAddress() == packet.client_address.host() && 167 net::test::TestPeerIPAddress() == packet.client_address.host() &&
167 kTestPort == packet.client_address.port(); 168 kTestPort == packet.client_address.port();
168 } 169 }
169 170
170 void DescribeTo(::std::ostream* os) const override {} 171 void DescribeTo(::std::ostream* os) const override {}
171 172
172 void DescribeNegationTo(::std::ostream* os) const override {} 173 void DescribeNegationTo(::std::ostream* os) const override {}
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections), 523 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections),
523 time_wait_list_manager_.num_connections()); 524 time_wait_list_manager_.num_connections());
524 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); 525 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict));
525 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); 526 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id));
526 } 527 }
527 } 528 }
528 529
529 } // namespace 530 } // namespace
530 } // namespace test 531 } // namespace test
531 } // namespace net 532 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698