| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 class MockFakeTimeEpollServer : public FakeTimeEpollServer { | 89 class MockFakeTimeEpollServer : public FakeTimeEpollServer { |
| 90 public: | 90 public: |
| 91 MOCK_METHOD2(RegisterAlarm, void(int64 timeout_in_us, | 91 MOCK_METHOD2(RegisterAlarm, void(int64 timeout_in_us, |
| 92 EpollAlarmCallbackInterface* alarm)); | 92 EpollAlarmCallbackInterface* alarm)); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 class QuicTimeWaitListManagerTest : public ::testing::Test { | 95 class QuicTimeWaitListManagerTest : public ::testing::Test { |
| 96 protected: | 96 protected: |
| 97 QuicTimeWaitListManagerTest() | 97 QuicTimeWaitListManagerTest() |
| 98 : helper_(&epoll_server_), | 98 : helper_(&epoll_server_), |
| 99 time_wait_list_manager_(&writer_, | 99 time_wait_list_manager_(&writer_, &visitor_, &helper_), |
| 100 &visitor_, | |
| 101 &helper_, | |
| 102 QuicSupportedVersions()), | |
| 103 framer_(QuicSupportedVersions(), | 100 framer_(QuicSupportedVersions(), |
| 104 QuicTime::Zero(), | 101 QuicTime::Zero(), |
| 105 Perspective::IS_SERVER), | 102 Perspective::IS_SERVER), |
| 106 connection_id_(45), | 103 connection_id_(45), |
| 107 client_address_(net::test::TestPeerIPAddress(), kTestPort), | 104 client_address_(net::test::TestPeerIPAddress(), kTestPort), |
| 108 writer_is_blocked_(false) {} | 105 writer_is_blocked_(false) {} |
| 109 | 106 |
| 110 ~QuicTimeWaitListManagerTest() override {} | 107 ~QuicTimeWaitListManagerTest() override {} |
| 111 | 108 |
| 112 void SetUp() override { | 109 void SetUp() override { |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 time_wait_list_manager_.num_connections()); | 537 time_wait_list_manager_.num_connections()); |
| 541 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); | 538 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); |
| 542 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); | 539 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); |
| 543 } | 540 } |
| 544 } | 541 } |
| 545 | 542 |
| 546 } // namespace | 543 } // namespace |
| 547 } // namespace test | 544 } // namespace test |
| 548 } // namespace tools | 545 } // namespace tools |
| 549 } // namespace net | 546 } // namespace net |
| OLD | NEW |