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 77 matching lines...) Loading... |
88 class QuicTimeWaitListManagerTest : public ::testing::Test { | 88 class QuicTimeWaitListManagerTest : public ::testing::Test { |
89 protected: | 89 protected: |
90 QuicTimeWaitListManagerTest() | 90 QuicTimeWaitListManagerTest() |
91 : time_wait_list_manager_(&writer_, &visitor_, | 91 : time_wait_list_manager_(&writer_, &visitor_, |
92 &epoll_server_, QuicSupportedVersions()), | 92 &epoll_server_, QuicSupportedVersions()), |
93 framer_(QuicSupportedVersions(), QuicTime::Zero(), true), | 93 framer_(QuicSupportedVersions(), QuicTime::Zero(), true), |
94 connection_id_(45), | 94 connection_id_(45), |
95 client_address_(net::test::TestPeerIPAddress(), kTestPort), | 95 client_address_(net::test::TestPeerIPAddress(), kTestPort), |
96 writer_is_blocked_(false) {} | 96 writer_is_blocked_(false) {} |
97 | 97 |
98 virtual ~QuicTimeWaitListManagerTest() override {} | 98 ~QuicTimeWaitListManagerTest() override {} |
99 | 99 |
100 virtual void SetUp() override { | 100 void SetUp() override { |
101 EXPECT_CALL(writer_, IsWriteBlocked()) | 101 EXPECT_CALL(writer_, IsWriteBlocked()) |
102 .WillRepeatedly(ReturnPointee(&writer_is_blocked_)); | 102 .WillRepeatedly(ReturnPointee(&writer_is_blocked_)); |
103 EXPECT_CALL(writer_, IsWriteBlockedDataBuffered()) | 103 EXPECT_CALL(writer_, IsWriteBlockedDataBuffered()) |
104 .WillRepeatedly(Return(false)); | 104 .WillRepeatedly(Return(false)); |
105 } | 105 } |
106 | 106 |
107 void AddConnectionId(QuicConnectionId connection_id) { | 107 void AddConnectionId(QuicConnectionId connection_id) { |
108 AddConnectionId(connection_id, QuicVersionMax(), nullptr); | 108 AddConnectionId(connection_id, QuicVersionMax(), nullptr); |
109 } | 109 } |
110 | 110 |
(...skipping 340 matching lines...) Loading... |
451 EXPECT_CALL(epoll_server_, RegisterAlarm(_, _)); | 451 EXPECT_CALL(epoll_server_, RegisterAlarm(_, _)); |
452 | 452 |
453 time_wait_list_manager_.CleanUpOldConnectionIds(); | 453 time_wait_list_manager_.CleanUpOldConnectionIds(); |
454 EXPECT_FALSE(IsConnectionIdInTimeWait(kConnectionId1)); | 454 EXPECT_FALSE(IsConnectionIdInTimeWait(kConnectionId1)); |
455 EXPECT_TRUE(IsConnectionIdInTimeWait(kConnectionId2)); | 455 EXPECT_TRUE(IsConnectionIdInTimeWait(kConnectionId2)); |
456 } | 456 } |
457 } // namespace | 457 } // namespace |
458 } // namespace test | 458 } // namespace test |
459 } // namespace tools | 459 } // namespace tools |
460 } // namespace net | 460 } // namespace net |
OLD | NEW |