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

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

Issue 981193003: Implement the "sanity checks" described in b/9509040: Incoming packets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Change_null_value_87819844
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
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 TestWriterFactory* factory_; 214 TestWriterFactory* factory_;
215 }; 215 };
216 216
217 // If an asynchronous write is happening and |writer| gets deleted, this 217 // If an asynchronous write is happening and |writer| gets deleted, this
218 // clears the pointer to it to prevent use-after-free. 218 // clears the pointer to it to prevent use-after-free.
219 void Unregister(PerConnectionPacketWriter* writer); 219 void Unregister(PerConnectionPacketWriter* writer);
220 220
221 PerConnectionPacketWriter* current_writer_; 221 PerConnectionPacketWriter* current_writer_;
222 }; 222 };
223 223
224 class MockTimeWaitListManager : public QuicTimeWaitListManager {
225 public:
226 MockTimeWaitListManager(QuicPacketWriter* writer,
227 QuicServerSessionVisitor* visitor,
228 EpollServer* eps);
229 ~MockTimeWaitListManager() override;
230
231 MOCK_METHOD5(ProcessPacket,
232 void(const IPEndPoint& server_address,
233 const IPEndPoint& client_address,
234 QuicConnectionId connection_id,
235 QuicPacketSequenceNumber sequence_number,
236 const QuicEncryptedPacket& packet));
237 };
238
224 } // namespace test 239 } // namespace test
225 } // namespace tools 240 } // namespace tools
226 } // namespace net 241 } // namespace net
227 242
228 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 243 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher_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