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

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

Issue 14083012: QUIC: retransmit packets with the correct encryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved HandshakeMode enum to MockCryptoClientStream Created 7 years, 7 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 size_t num_stream_frames; 69 size_t num_stream_frames;
70 70
71 QuicFecGroupNumber fec_group; 71 QuicFecGroupNumber fec_group;
72 }; 72 };
73 73
74 } // namespace 74 } // namespace
75 75
76 class QuicPacketGeneratorTest : public ::testing::Test { 76 class QuicPacketGeneratorTest : public ::testing::Test {
77 protected: 77 protected:
78 QuicPacketGeneratorTest() 78 QuicPacketGeneratorTest()
79 : framer_(kQuicVersion1, 79 : framer_(kQuicVersion1, QuicTime::Zero(), false),
80 QuicDecrypter::Create(kNULL),
81 QuicEncrypter::Create(kNULL),
82 QuicTime::Zero(),
83 false),
84 creator_(42, &framer_, &random_, false), 80 creator_(42, &framer_, &random_, false),
85 generator_(&delegate_, &creator_), 81 generator_(&delegate_, &creator_),
86 packet_(0, NULL, 0, NULL), 82 packet_(0, NULL, 0, NULL),
87 packet2_(0, NULL, 0, NULL), 83 packet2_(0, NULL, 0, NULL),
88 packet3_(0, NULL, 0, NULL), 84 packet3_(0, NULL, 0, NULL),
89 packet4_(0, NULL, 0, NULL), 85 packet4_(0, NULL, 0, NULL),
90 packet5_(0, NULL, 0, NULL) { 86 packet5_(0, NULL, 0, NULL) {
91 } 87 }
92 88
93 ~QuicPacketGeneratorTest() { 89 ~QuicPacketGeneratorTest() {
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 501
506 // The second should have the remainder of the stream data. 502 // The second should have the remainder of the stream data.
507 PacketContents contents2; 503 PacketContents contents2;
508 contents2.num_goaway_frames = 1; 504 contents2.num_goaway_frames = 1;
509 contents2.num_stream_frames = 1; 505 contents2.num_stream_frames = 1;
510 CheckPacketContains(contents2, packet2_); 506 CheckPacketContains(contents2, packet2_);
511 } 507 }
512 508
513 } // namespace test 509 } // namespace test
514 } // namespace net 510 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698