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

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

Issue 1662433002: Per-packet options now passed through to QuicPacketWriter, instead of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113054959
Patch Set: Fix comments for Patch Set 1 Created 4 years, 10 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/quic/quic_session_test.cc ('k') | net/tools/quic/end_to_end_test.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_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 <stddef.h> 10 #include <stddef.h>
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 QuicPromisedByUrlMap promised_by_url_; 555 QuicPromisedByUrlMap promised_by_url_;
556 556
557 DISALLOW_COPY_AND_ASSIGN(TestQuicSpdyClientSession); 557 DISALLOW_COPY_AND_ASSIGN(TestQuicSpdyClientSession);
558 }; 558 };
559 559
560 class MockPacketWriter : public QuicPacketWriter { 560 class MockPacketWriter : public QuicPacketWriter {
561 public: 561 public:
562 MockPacketWriter(); 562 MockPacketWriter();
563 ~MockPacketWriter() override; 563 ~MockPacketWriter() override;
564 564
565 MOCK_METHOD4(WritePacket, 565 MOCK_METHOD5(WritePacket,
566 WriteResult(const char* buffer, 566 WriteResult(const char* buffer,
567 size_t buf_len, 567 size_t buf_len,
568 const IPAddressNumber& self_address, 568 const IPAddressNumber& self_address,
569 const IPEndPoint& peer_address)); 569 const IPEndPoint& peer_address,
570 PerPacketOptions* options));
570 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); 571 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool());
571 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); 572 MOCK_CONST_METHOD0(IsWriteBlocked, bool());
572 MOCK_METHOD0(SetWritable, void()); 573 MOCK_METHOD0(SetWritable, void());
573 MOCK_CONST_METHOD1(GetMaxPacketSize, 574 MOCK_CONST_METHOD1(GetMaxPacketSize,
574 QuicByteCount(const IPEndPoint& peer_address)); 575 QuicByteCount(const IPEndPoint& peer_address));
575 576
576 private: 577 private:
577 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); 578 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter);
578 }; 579 };
579 580
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 TestQuicSpdyServerSession** server_session); 813 TestQuicSpdyServerSession** server_session);
813 814
814 // Helper to generate client side stream ids, generalizes 815 // Helper to generate client side stream ids, generalizes
815 // kClientDataStreamId1 etc. above. 816 // kClientDataStreamId1 etc. above.
816 QuicStreamId QuicClientDataStreamId(int i); 817 QuicStreamId QuicClientDataStreamId(int i);
817 818
818 } // namespace test 819 } // namespace test
819 } // namespace net 820 } // namespace net
820 821
821 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 822 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698