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

Side by Side Diff: net/quic/quic_packet_generator_test.cc

Issue 325373002: Use override consistently instead of virtual. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_sent_packet_manager_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 #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 15 matching lines...) Expand all
26 using testing::StrictMock; 26 using testing::StrictMock;
27 using testing::_; 27 using testing::_;
28 28
29 namespace net { 29 namespace net {
30 namespace test { 30 namespace test {
31 namespace { 31 namespace {
32 32
33 class MockDelegate : public QuicPacketGenerator::DelegateInterface { 33 class MockDelegate : public QuicPacketGenerator::DelegateInterface {
34 public: 34 public:
35 MockDelegate() {} 35 MockDelegate() {}
36 virtual ~MockDelegate() {} 36 virtual ~MockDelegate() OVERRIDE {}
37 37
38 MOCK_METHOD3(ShouldGeneratePacket, 38 MOCK_METHOD3(ShouldGeneratePacket,
39 bool(TransmissionType transmission_type, 39 bool(TransmissionType transmission_type,
40 HasRetransmittableData retransmittable, 40 HasRetransmittableData retransmittable,
41 IsHandshake handshake)); 41 IsHandshake handshake));
42 MOCK_METHOD0(CreateAckFrame, QuicAckFrame*()); 42 MOCK_METHOD0(CreateAckFrame, QuicAckFrame*());
43 MOCK_METHOD0(CreateFeedbackFrame, QuicCongestionFeedbackFrame*()); 43 MOCK_METHOD0(CreateFeedbackFrame, QuicCongestionFeedbackFrame*());
44 MOCK_METHOD0(CreateStopWaitingFrame, QuicStopWaitingFrame*()); 44 MOCK_METHOD0(CreateStopWaitingFrame, QuicStopWaitingFrame*());
45 MOCK_METHOD1(OnSerializedPacket, bool(const SerializedPacket& packet)); 45 MOCK_METHOD1(OnSerializedPacket, bool(const SerializedPacket& packet));
46 MOCK_METHOD2(CloseConnection, void(QuicErrorCode, bool)); 46 MOCK_METHOD2(CloseConnection, void(QuicErrorCode, bool));
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 generator_(&delegate_, NULL, &creator_), 110 generator_(&delegate_, NULL, &creator_),
111 packet_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL), 111 packet_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL),
112 packet2_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL), 112 packet2_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL),
113 packet3_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL), 113 packet3_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL),
114 packet4_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL), 114 packet4_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL),
115 packet5_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL), 115 packet5_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL),
116 packet6_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL), 116 packet6_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL),
117 packet7_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL) { 117 packet7_(0, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, NULL) {
118 } 118 }
119 119
120 ~QuicPacketGeneratorTest() { 120 virtual ~QuicPacketGeneratorTest() OVERRIDE {
121 delete packet_.packet; 121 delete packet_.packet;
122 delete packet_.retransmittable_frames; 122 delete packet_.retransmittable_frames;
123 delete packet2_.packet; 123 delete packet2_.packet;
124 delete packet2_.retransmittable_frames; 124 delete packet2_.retransmittable_frames;
125 delete packet3_.packet; 125 delete packet3_.packet;
126 delete packet3_.retransmittable_frames; 126 delete packet3_.retransmittable_frames;
127 delete packet4_.packet; 127 delete packet4_.packet;
128 delete packet4_.retransmittable_frames; 128 delete packet4_.retransmittable_frames;
129 delete packet5_.packet; 129 delete packet5_.packet;
130 delete packet5_.retransmittable_frames; 130 delete packet5_.retransmittable_frames;
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 889
890 // The second should have the remainder of the stream data. 890 // The second should have the remainder of the stream data.
891 PacketContents contents2; 891 PacketContents contents2;
892 contents2.num_goaway_frames = 1; 892 contents2.num_goaway_frames = 1;
893 contents2.num_stream_frames = 1; 893 contents2.num_stream_frames = 1;
894 CheckPacketContains(contents2, packet2_); 894 CheckPacketContains(contents2, packet2_);
895 } 895 }
896 896
897 } // namespace test 897 } // namespace test
898 } // namespace net 898 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698