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

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

Issue 1499163002: Fix ASAN test failure in QUIC's CryptoHandshakeMessageTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108754896
Patch Set: Created 5 years 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/reliable_quic_stream_test.cc ('k') | net/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_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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 bool fin, 447 bool fin,
448 size_t frame_len)); 448 size_t frame_len));
449 MOCK_METHOD3(SendRstStream, void(QuicStreamId stream_id, 449 MOCK_METHOD3(SendRstStream, void(QuicStreamId stream_id,
450 QuicRstStreamErrorCode error, 450 QuicRstStreamErrorCode error,
451 QuicStreamOffset bytes_written)); 451 QuicStreamOffset bytes_written));
452 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool()); 452 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool());
453 MOCK_METHOD1(OnHeadersHeadOfLineBlocking, void(QuicTime::Delta delta)); 453 MOCK_METHOD1(OnHeadersHeadOfLineBlocking, void(QuicTime::Delta delta));
454 454
455 using QuicSession::ActivateStream; 455 using QuicSession::ActivateStream;
456 456
457 // Returns a QuicConsumedData that indicates all of |data| (and |fin| if set)
458 // has been consumed.
459 static QuicConsumedData ConsumeAllData(
460 QuicStreamId id,
461 const QuicIOVector& data,
462 QuicStreamOffset offset,
463 bool fin,
464 FecProtection fec_protection,
465 QuicAckListenerInterface* ack_notifier_delegate);
466
457 private: 467 private:
458 scoped_ptr<QuicCryptoStream> crypto_stream_; 468 scoped_ptr<QuicCryptoStream> crypto_stream_;
459 469
460 DISALLOW_COPY_AND_ASSIGN(MockQuicSpdySession); 470 DISALLOW_COPY_AND_ASSIGN(MockQuicSpdySession);
461 }; 471 };
462 472
463 class TestQuicSpdyServerSession : public tools::QuicServerSession { 473 class TestQuicSpdyServerSession : public tools::QuicServerSession {
464 public: 474 public:
465 TestQuicSpdyServerSession(QuicConnection* connection, 475 TestQuicSpdyServerSession(QuicConnection* connection,
466 const QuicConfig& config, 476 const QuicConfig& config,
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 TestQuicSpdyServerSession** server_session); 791 TestQuicSpdyServerSession** server_session);
782 792
783 // Helper to generate client side stream ids, generalizes 793 // Helper to generate client side stream ids, generalizes
784 // kClientDataStreamId1 etc. above. 794 // kClientDataStreamId1 etc. above.
785 QuicStreamId QuicClientDataStreamId(int i); 795 QuicStreamId QuicClientDataStreamId(int i);
786 796
787 } // namespace test 797 } // namespace test
788 } // namespace net 798 } // namespace net
789 799
790 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 800 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream_test.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