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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enough! Created 5 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 (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_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 ~NiceMockPacketWriterFactory() override {} 317 ~NiceMockPacketWriterFactory() override {}
318 318
319 QuicPacketWriter* Create(QuicConnection* /*connection*/) const override; 319 QuicPacketWriter* Create(QuicConnection* /*connection*/) const override;
320 320
321 private: 321 private:
322 DISALLOW_COPY_AND_ASSIGN(NiceMockPacketWriterFactory); 322 DISALLOW_COPY_AND_ASSIGN(NiceMockPacketWriterFactory);
323 }; 323 };
324 324
325 class MockConnection : public QuicConnection { 325 class MockConnection : public QuicConnection {
326 public: 326 public:
327 // Uses a ConnectionId of 42, 127.0.0.1:123 and is_secure equals false. 327 // Uses a ConnectionId of 42 and 127.0.0.1:123.
328 MockConnection(MockHelper* helper, Perspective perspective); 328 MockConnection(MockHelper* helper, Perspective perspective);
329 329
330 // Uses a ConnectionId of 42, and 127.0.0.1:123. 330 // Uses a ConnectionId of 42.
331 MockConnection(MockHelper* helper, Perspective perspective, bool is_secure);
332
333 // Uses ConnectionId of 42 and is_secure equals false.
334 MockConnection(IPEndPoint address, 331 MockConnection(IPEndPoint address,
335 MockHelper* helper, 332 MockHelper* helper,
336 Perspective perspective); 333 Perspective perspective);
337 334
338 // Uses a ConnectionId of 42, 127.0.0.1:123 and is_secure equals false.
339 MockConnection(QuicConnectionId connection_id,
340 MockHelper* helper,
341 Perspective perspective);
342
343 // Uses 127.0.0.1:123. 335 // Uses 127.0.0.1:123.
344 MockConnection(QuicConnectionId connection_id, 336 MockConnection(QuicConnectionId connection_id,
345 MockHelper* helper, 337 MockHelper* helper,
346 Perspective perspective, 338 Perspective perspective);
347 bool is_secure);
348 339
349 // Uses a ConnectionId of 42, 127.0.0.1:123 and is_secure equals false. 340 // Uses a ConnectionId of 42, and 127.0.0.1:123.
350 MockConnection(MockHelper* helper, 341 MockConnection(MockHelper* helper,
351 Perspective perspective, 342 Perspective perspective,
352 const QuicVersionVector& supported_versions); 343 const QuicVersionVector& supported_versions);
353 344
354 MockConnection(QuicConnectionId connection_id, 345 MockConnection(QuicConnectionId connection_id,
355 IPEndPoint address, 346 IPEndPoint address,
356 MockHelper* helper, 347 MockHelper* helper,
357 Perspective perspective, 348 Perspective perspective,
358 bool is_secure,
359 const QuicVersionVector& supported_versions); 349 const QuicVersionVector& supported_versions);
360 350
361 ~MockConnection() override; 351 ~MockConnection() override;
362 352
363 // If the constructor that uses a MockHelper has been used then this method 353 // If the constructor that uses a MockHelper has been used then this method
364 // will advance the time of the MockClock. 354 // will advance the time of the MockClock.
365 void AdvanceTime(QuicTime::Delta delta); 355 void AdvanceTime(QuicTime::Delta delta);
366 356
367 MOCK_METHOD3(ProcessUdpPacket, void(const IPEndPoint& self_address, 357 MOCK_METHOD3(ProcessUdpPacket, void(const IPEndPoint& self_address,
368 const IPEndPoint& peer_address, 358 const IPEndPoint& peer_address,
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 TestQuicSpdyServerSession** server_session); 773 TestQuicSpdyServerSession** server_session);
784 774
785 // Helper to generate client side stream ids, generalizes 775 // Helper to generate client side stream ids, generalizes
786 // kClientDataStreamId1 etc. above. 776 // kClientDataStreamId1 etc. above.
787 QuicStreamId QuicClientDataStreamId(int i); 777 QuicStreamId QuicClientDataStreamId(int i);
788 778
789 } // namespace test 779 } // namespace test
790 } // namespace net 780 } // namespace net
791 781
792 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 782 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_chromium_client_session_peer.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698