| OLD | NEW |
| 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 #include "net/quic/quic_packet_generator.h" | 5 #include "net/quic/quic_packet_generator.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "net/quic/crypto/crypto_protocol.h" | 9 #include "net/quic/crypto/crypto_protocol.h" |
| 10 #include "net/quic/crypto/null_encrypter.h" | 10 #include "net/quic/crypto/null_encrypter.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 using testing::StrictMock; | 24 using testing::StrictMock; |
| 25 using testing::_; | 25 using testing::_; |
| 26 | 26 |
| 27 namespace net { | 27 namespace net { |
| 28 namespace test { | 28 namespace test { |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 class MockDelegate : public QuicPacketGenerator::DelegateInterface { | 31 class MockDelegate : public QuicPacketGenerator::DelegateInterface { |
| 32 public: | 32 public: |
| 33 MockDelegate() {} | 33 MockDelegate() {} |
| 34 virtual ~MockDelegate() {} | 34 virtual ~MockDelegate() OVERRIDE {} |
| 35 | 35 |
| 36 MOCK_METHOD3(ShouldGeneratePacket, | 36 MOCK_METHOD3(ShouldGeneratePacket, |
| 37 bool(TransmissionType transmission_type, | 37 bool(TransmissionType transmission_type, |
| 38 HasRetransmittableData retransmittable, | 38 HasRetransmittableData retransmittable, |
| 39 IsHandshake handshake)); | 39 IsHandshake handshake)); |
| 40 MOCK_METHOD0(CreateAckFrame, QuicAckFrame*()); | 40 MOCK_METHOD0(CreateAckFrame, QuicAckFrame*()); |
| 41 MOCK_METHOD0(CreateFeedbackFrame, QuicCongestionFeedbackFrame*()); | 41 MOCK_METHOD0(CreateFeedbackFrame, QuicCongestionFeedbackFrame*()); |
| 42 MOCK_METHOD1(OnSerializedPacket, bool(const SerializedPacket& packet)); | 42 MOCK_METHOD1(OnSerializedPacket, bool(const SerializedPacket& packet)); |
| 43 MOCK_METHOD2(CloseConnection, void(QuicErrorCode, bool)); | 43 MOCK_METHOD2(CloseConnection, void(QuicErrorCode, bool)); |
| 44 | 44 |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 | 612 |
| 613 // The second should have the remainder of the stream data. | 613 // The second should have the remainder of the stream data. |
| 614 PacketContents contents2; | 614 PacketContents contents2; |
| 615 contents2.num_goaway_frames = 1; | 615 contents2.num_goaway_frames = 1; |
| 616 contents2.num_stream_frames = 1; | 616 contents2.num_stream_frames = 1; |
| 617 CheckPacketContains(contents2, packet2_); | 617 CheckPacketContains(contents2, packet2_); |
| 618 } | 618 } |
| 619 | 619 |
| 620 } // namespace test | 620 } // namespace test |
| 621 } // namespace net | 621 } // namespace net |
| OLD | NEW |