OLD | NEW |
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 return net::test::ConstructEncryptedPacket(connection_id, false, false, | 133 return net::test::ConstructEncryptedPacket(connection_id, false, false, |
134 false, kDefaultPathId, | 134 false, kDefaultPathId, |
135 packet_number, "data"); | 135 packet_number, "data"); |
136 } | 136 } |
137 | 137 |
138 QuicFlagSaver flags_; // Save/restore all QUIC flag values. | 138 QuicFlagSaver flags_; // Save/restore all QUIC flag values. |
139 NiceMock<MockFakeTimeEpollServer> epoll_server_; | 139 NiceMock<MockFakeTimeEpollServer> epoll_server_; |
140 QuicEpollConnectionHelper helper_; | 140 QuicEpollConnectionHelper helper_; |
141 QuicEpollAlarmFactory alarm_factory_; | 141 QuicEpollAlarmFactory alarm_factory_; |
142 StrictMock<MockPacketWriter> writer_; | 142 StrictMock<MockPacketWriter> writer_; |
143 StrictMock<MockQuicServerSessionVisitor> visitor_; | 143 StrictMock<MockQuicSessionVisitor> visitor_; |
144 QuicTimeWaitListManager time_wait_list_manager_; | 144 QuicTimeWaitListManager time_wait_list_manager_; |
145 QuicConnectionId connection_id_; | 145 QuicConnectionId connection_id_; |
146 IPEndPoint server_address_; | 146 IPEndPoint server_address_; |
147 IPEndPoint client_address_; | 147 IPEndPoint client_address_; |
148 bool writer_is_blocked_; | 148 bool writer_is_blocked_; |
149 }; | 149 }; |
150 | 150 |
151 class ValidatePublicResetPacketPredicate | 151 class ValidatePublicResetPacketPredicate |
152 : public MatcherInterface<const std::tr1::tuple<const char*, int>> { | 152 : public MatcherInterface<const std::tr1::tuple<const char*, int>> { |
153 public: | 153 public: |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections), | 533 EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections), |
534 time_wait_list_manager_.num_connections()); | 534 time_wait_list_manager_.num_connections()); |
535 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); | 535 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); |
536 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); | 536 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); |
537 } | 537 } |
538 } | 538 } |
539 | 539 |
540 } // namespace | 540 } // namespace |
541 } // namespace test | 541 } // namespace test |
542 } // namespace net | 542 } // namespace net |
OLD | NEW |