Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: net/tools/quic/quic_time_wait_list_manager_test.cc

Issue 2460163002: Refactor QuicServerSessionBase::Visitor (Closed)
Patch Set: Updated patchset dependency Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager.cc ('k') | net/tools/quic/test_tools/mock_quic_server_session_visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698