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

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

Issue 2311573002: Add QuicFlagSaver to files in net/tools/quic/ (Closed)
Patch Set: Created 4 years, 3 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 // 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 9
10 #include "net/quic/core/crypto/crypto_protocol.h" 10 #include "net/quic/core/crypto/crypto_protocol.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 QuicEncryptedPacket* ConstructEncryptedPacket( 147 QuicEncryptedPacket* ConstructEncryptedPacket(
148 QuicConnectionId connection_id, 148 QuicConnectionId connection_id,
149 QuicPacketNumber packet_number) { 149 QuicPacketNumber packet_number) {
150 return net::test::ConstructEncryptedPacket(connection_id, false, false, 150 return net::test::ConstructEncryptedPacket(connection_id, false, false,
151 false, kDefaultPathId, 151 false, kDefaultPathId,
152 packet_number, "data"); 152 packet_number, "data");
153 } 153 }
154 154
155 QuicFlagSaver flags_; // Save/restore all QUIC flag values.
155 NiceMock<MockFakeTimeEpollServer> epoll_server_; 156 NiceMock<MockFakeTimeEpollServer> epoll_server_;
156 QuicEpollConnectionHelper helper_; 157 QuicEpollConnectionHelper helper_;
157 QuicEpollAlarmFactory alarm_factory_; 158 QuicEpollAlarmFactory alarm_factory_;
158 StrictMock<MockPacketWriter> writer_; 159 StrictMock<MockPacketWriter> writer_;
159 StrictMock<MockQuicServerSessionVisitor> visitor_; 160 StrictMock<MockQuicServerSessionVisitor> visitor_;
160 QuicTimeWaitListManager time_wait_list_manager_; 161 QuicTimeWaitListManager time_wait_list_manager_;
161 QuicConnectionId connection_id_; 162 QuicConnectionId connection_id_;
162 IPEndPoint server_address_; 163 IPEndPoint server_address_;
163 IPEndPoint client_address_; 164 IPEndPoint client_address_;
164 bool writer_is_blocked_; 165 bool writer_is_blocked_;
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections), 550 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections),
550 time_wait_list_manager_.num_connections()); 551 time_wait_list_manager_.num_connections());
551 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); 552 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict));
552 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); 553 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id));
553 } 554 }
554 } 555 }
555 556
556 } // namespace 557 } // namespace
557 } // namespace test 558 } // namespace test
558 } // namespace net 559 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_session_test.cc ('k') | net/tools/quic/stateless_rejector_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698