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

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

Issue 1041853002: Land Recent QUIC Changes until 03/25/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rch_patch_1036023002
Patch Set: Created 5 years, 8 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_sent_packet_manager.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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 TestWriterFactory* factory_; 616 TestWriterFactory* factory_;
617 }; 617 };
618 618
619 // If an asynchronous write is happening and |writer| gets deleted, this 619 // If an asynchronous write is happening and |writer| gets deleted, this
620 // clears the pointer to it to prevent use-after-free. 620 // clears the pointer to it to prevent use-after-free.
621 void Unregister(PerConnectionPacketWriter* writer); 621 void Unregister(PerConnectionPacketWriter* writer);
622 622
623 PerConnectionPacketWriter* current_writer_; 623 PerConnectionPacketWriter* current_writer_;
624 }; 624 };
625 625
626 class MockQuicConnectionDebugVisitor : public QuicConnectionDebugVisitor {
627 public:
628 MockQuicConnectionDebugVisitor();
629 ~MockQuicConnectionDebugVisitor();
630
631 MOCK_METHOD1(OnFrameAddedToPacket, void(const QuicFrame&));
632
633 MOCK_METHOD6(OnPacketSent,
634 void(const SerializedPacket&,
635 QuicPacketSequenceNumber,
636 EncryptionLevel,
637 TransmissionType,
638 const QuicEncryptedPacket&,
639 QuicTime));
640
641 MOCK_METHOD3(OnPacketReceived,
642 void(const IPEndPoint&,
643 const IPEndPoint&,
644 const QuicEncryptedPacket&));
645
646 MOCK_METHOD1(OnIncorrectConnectionId, void(QuicConnectionId));
647
648 MOCK_METHOD1(OnProtocolVersionMismatch, void(QuicVersion));
649
650 MOCK_METHOD1(OnPacketHeader, void(const QuicPacketHeader& header));
651
652 MOCK_METHOD1(OnStreamFrame, void(const QuicStreamFrame&));
653
654 MOCK_METHOD1(OnAckFrame, void(const QuicAckFrame& frame));
655
656 MOCK_METHOD1(OnStopWaitingFrame, void(const QuicStopWaitingFrame&));
657
658 MOCK_METHOD1(OnRstStreamFrame, void(const QuicRstStreamFrame&));
659
660 MOCK_METHOD1(OnConnectionCloseFrame, void(const QuicConnectionCloseFrame&));
661
662 MOCK_METHOD1(OnPublicResetPacket, void(const QuicPublicResetPacket&));
663
664 MOCK_METHOD1(OnVersionNegotiationPacket,
665 void(const QuicVersionNegotiationPacket&));
666
667 MOCK_METHOD2(OnRevivedPacket,
668 void(const QuicPacketHeader&, StringPiece payload));
669 };
670
626 } // namespace test 671 } // namespace test
627 } // namespace net 672 } // namespace net
628 673
629 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 674 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.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