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 27 matching lines...) Expand all Loading... |
38 using testing::Truly; | 38 using testing::Truly; |
39 using testing::_; | 39 using testing::_; |
40 | 40 |
41 namespace net { | 41 namespace net { |
42 namespace tools { | 42 namespace tools { |
43 namespace test { | 43 namespace test { |
44 | 44 |
45 class FramerVisitorCapturingPublicReset : public NoOpFramerVisitor { | 45 class FramerVisitorCapturingPublicReset : public NoOpFramerVisitor { |
46 public: | 46 public: |
47 FramerVisitorCapturingPublicReset() {} | 47 FramerVisitorCapturingPublicReset() {} |
48 virtual ~FramerVisitorCapturingPublicReset() override {} | 48 ~FramerVisitorCapturingPublicReset() override {} |
49 | 49 |
50 virtual void OnPublicResetPacket( | 50 void OnPublicResetPacket(const QuicPublicResetPacket& public_reset) override { |
51 const QuicPublicResetPacket& public_reset) override { | |
52 public_reset_packet_ = public_reset; | 51 public_reset_packet_ = public_reset; |
53 } | 52 } |
54 | 53 |
55 const QuicPublicResetPacket public_reset_packet() { | 54 const QuicPublicResetPacket public_reset_packet() { |
56 return public_reset_packet_; | 55 return public_reset_packet_; |
57 } | 56 } |
58 | 57 |
59 private: | 58 private: |
60 QuicPublicResetPacket public_reset_packet_; | 59 QuicPublicResetPacket public_reset_packet_; |
61 }; | 60 }; |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 EXPECT_CALL(epoll_server_, RegisterAlarm(_, _)); | 451 EXPECT_CALL(epoll_server_, RegisterAlarm(_, _)); |
453 | 452 |
454 time_wait_list_manager_.CleanUpOldConnectionIds(); | 453 time_wait_list_manager_.CleanUpOldConnectionIds(); |
455 EXPECT_FALSE(IsConnectionIdInTimeWait(kConnectionId1)); | 454 EXPECT_FALSE(IsConnectionIdInTimeWait(kConnectionId1)); |
456 EXPECT_TRUE(IsConnectionIdInTimeWait(kConnectionId2)); | 455 EXPECT_TRUE(IsConnectionIdInTimeWait(kConnectionId2)); |
457 } | 456 } |
458 } // namespace | 457 } // namespace |
459 } // namespace test | 458 } // namespace test |
460 } // namespace tools | 459 } // namespace tools |
461 } // namespace net | 460 } // namespace net |
OLD | NEW |