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

Side by Side Diff: net/tools/quic/test_tools/quic_test_utils.h

Issue 1029463003: Improve tests. Correct things clang_tidy complains about. Make (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Common utilities for Quic tests 5 // Common utilities for Quic tests
6 6
7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void Unregister(PerConnectionPacketWriter* writer); 146 void Unregister(PerConnectionPacketWriter* writer);
147 147
148 PerConnectionPacketWriter* current_writer_; 148 PerConnectionPacketWriter* current_writer_;
149 }; 149 };
150 150
151 class MockTimeWaitListManager : public QuicTimeWaitListManager { 151 class MockTimeWaitListManager : public QuicTimeWaitListManager {
152 public: 152 public:
153 MockTimeWaitListManager(QuicPacketWriter* writer, 153 MockTimeWaitListManager(QuicPacketWriter* writer,
154 QuicServerSessionVisitor* visitor, 154 QuicServerSessionVisitor* visitor,
155 EpollServer* eps); 155 EpollServer* eps);
156
156 ~MockTimeWaitListManager() override; 157 ~MockTimeWaitListManager() override;
157 158
159 MOCK_METHOD3(AddConnectionIdToTimeWait,
160 void(QuicConnectionId connection_id,
161 QuicVersion version,
162 QuicEncryptedPacket* close_packet));
163
164 void QuicTimeWaitListManager_AddConnectionIdToTimeWait(
165 QuicConnectionId connection_id,
166 QuicVersion version,
167 QuicEncryptedPacket* close_packet) {
168 QuicTimeWaitListManager::AddConnectionIdToTimeWait(connection_id, version,
169 close_packet);
170 }
171
158 MOCK_METHOD5(ProcessPacket, 172 MOCK_METHOD5(ProcessPacket,
159 void(const IPEndPoint& server_address, 173 void(const IPEndPoint& server_address,
160 const IPEndPoint& client_address, 174 const IPEndPoint& client_address,
161 QuicConnectionId connection_id, 175 QuicConnectionId connection_id,
162 QuicPacketSequenceNumber sequence_number, 176 QuicPacketSequenceNumber sequence_number,
163 const QuicEncryptedPacket& packet)); 177 const QuicEncryptedPacket& packet));
164 }; 178 };
165 179
166 } // namespace test 180 } // namespace test
167 } // namespace tools 181 } // namespace tools
168 } // namespace net 182 } // namespace net
169 183
170 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 184 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager_test.cc ('k') | net/tools/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698