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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 QuicFecGroupNumber fec_group; | 72 QuicFecGroupNumber fec_group; |
73 }; | 73 }; |
74 | 74 |
75 } // namespace | 75 } // namespace |
76 | 76 |
77 class QuicPacketGeneratorTest : public ::testing::Test { | 77 class QuicPacketGeneratorTest : public ::testing::Test { |
78 protected: | 78 protected: |
79 QuicPacketGeneratorTest() | 79 QuicPacketGeneratorTest() |
80 : framer_(kQuicVersion1, QuicTime::Zero(), false), | 80 : framer_(kQuicVersion1, QuicTime::Zero(), false), |
81 creator_(42, &framer_, &random_, false), | 81 creator_(42, &framer_, &random_, false), |
82 generator_(&delegate_, &creator_), | 82 generator_(&delegate_, NULL, &creator_), |
83 packet_(0, NULL, 0, NULL), | 83 packet_(0, NULL, 0, NULL), |
84 packet2_(0, NULL, 0, NULL), | 84 packet2_(0, NULL, 0, NULL), |
85 packet3_(0, NULL, 0, NULL), | 85 packet3_(0, NULL, 0, NULL), |
86 packet4_(0, NULL, 0, NULL), | 86 packet4_(0, NULL, 0, NULL), |
87 packet5_(0, NULL, 0, NULL) { | 87 packet5_(0, NULL, 0, NULL) { |
88 } | 88 } |
89 | 89 |
90 ~QuicPacketGeneratorTest() { | 90 ~QuicPacketGeneratorTest() { |
91 delete packet_.packet; | 91 delete packet_.packet; |
92 delete packet_.retransmittable_frames; | 92 delete packet_.retransmittable_frames; |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 | 502 |
503 // The second should have the remainder of the stream data. | 503 // The second should have the remainder of the stream data. |
504 PacketContents contents2; | 504 PacketContents contents2; |
505 contents2.num_goaway_frames = 1; | 505 contents2.num_goaway_frames = 1; |
506 contents2.num_stream_frames = 1; | 506 contents2.num_stream_frames = 1; |
507 CheckPacketContains(contents2, packet2_); | 507 CheckPacketContains(contents2, packet2_); |
508 } | 508 } |
509 | 509 |
510 } // namespace test | 510 } // namespace test |
511 } // namespace net | 511 } // namespace net |
OLD | NEW |