| 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 | 8 |
| 9 #include "net/quic/crypto/crypto_protocol.h" | 9 #include "net/quic/crypto/crypto_protocol.h" |
| 10 #include "net/quic/crypto/null_encrypter.h" | 10 #include "net/quic/crypto/null_encrypter.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 void DescribeTo(::std::ostream* os) const override {} | 217 void DescribeTo(::std::ostream* os) const override {} |
| 218 | 218 |
| 219 void DescribeNegationTo(::std::ostream* os) const override {} | 219 void DescribeNegationTo(::std::ostream* os) const override {} |
| 220 | 220 |
| 221 private: | 221 private: |
| 222 QuicConnectionId connection_id_; | 222 QuicConnectionId connection_id_; |
| 223 QuicPacketSequenceNumber sequence_number_; | 223 QuicPacketSequenceNumber sequence_number_; |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 | 226 Matcher<const std::tr1::tuple<const char*, int>> PublicResetPacketEq( |
| 227 Matcher<const std::tr1::tuple<const char*, int> > PublicResetPacketEq( | |
| 228 QuicConnectionId connection_id, | 227 QuicConnectionId connection_id, |
| 229 QuicPacketSequenceNumber sequence_number) { | 228 QuicPacketSequenceNumber sequence_number) { |
| 230 return MakeMatcher(new ValidatePublicResetPacketPredicate(connection_id, | 229 return MakeMatcher(new ValidatePublicResetPacketPredicate(connection_id, |
| 231 sequence_number)); | 230 sequence_number)); |
| 232 } | 231 } |
| 233 | 232 |
| 234 TEST_F(QuicTimeWaitListManagerTest, CheckConnectionIdInTimeWait) { | 233 TEST_F(QuicTimeWaitListManagerTest, CheckConnectionIdInTimeWait) { |
| 235 EXPECT_FALSE(IsConnectionIdInTimeWait(connection_id_)); | 234 EXPECT_FALSE(IsConnectionIdInTimeWait(connection_id_)); |
| 236 EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(connection_id_)); | 235 EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(connection_id_)); |
| 237 AddConnectionId(connection_id_); | 236 AddConnectionId(connection_id_); |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 time_wait_list_manager_.num_connections()); | 550 time_wait_list_manager_.num_connections()); |
| 552 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); | 551 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); |
| 553 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); | 552 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); |
| 554 } | 553 } |
| 555 } | 554 } |
| 556 | 555 |
| 557 } // namespace | 556 } // namespace |
| 558 } // namespace test | 557 } // namespace test |
| 559 } // namespace tools | 558 } // namespace tools |
| 560 } // namespace net | 559 } // namespace net |
| OLD | NEW |