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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 delete packet7_.retransmittable_frames; | 134 delete packet7_.retransmittable_frames; |
135 } | 135 } |
136 | 136 |
137 QuicAckFrame* CreateAckFrame() { | 137 QuicAckFrame* CreateAckFrame() { |
138 // TODO(rch): Initialize this so it can be verified later. | 138 // TODO(rch): Initialize this so it can be verified later. |
139 return new QuicAckFrame(MakeAckFrame(0)); | 139 return new QuicAckFrame(MakeAckFrame(0)); |
140 } | 140 } |
141 | 141 |
142 QuicCongestionFeedbackFrame* CreateFeedbackFrame() { | 142 QuicCongestionFeedbackFrame* CreateFeedbackFrame() { |
143 QuicCongestionFeedbackFrame* frame = new QuicCongestionFeedbackFrame; | 143 QuicCongestionFeedbackFrame* frame = new QuicCongestionFeedbackFrame; |
144 frame->type = kFixRate; | 144 frame->type = kTCP; |
145 frame->fix_rate.bitrate = QuicBandwidth::FromBytesPerSecond(42); | 145 frame->tcp.receive_window = 0x4030; |
146 return frame; | 146 return frame; |
147 } | 147 } |
148 | 148 |
149 QuicStopWaitingFrame* CreateStopWaitingFrame() { | 149 QuicStopWaitingFrame* CreateStopWaitingFrame() { |
150 QuicStopWaitingFrame* frame = new QuicStopWaitingFrame(); | 150 QuicStopWaitingFrame* frame = new QuicStopWaitingFrame(); |
151 frame->entropy_hash = 0; | 151 frame->entropy_hash = 0; |
152 frame->least_unacked = 0; | 152 frame->least_unacked = 0; |
153 return frame; | 153 return frame; |
154 } | 154 } |
155 | 155 |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 | 963 |
964 // The second should have the remainder of the stream data. | 964 // The second should have the remainder of the stream data. |
965 PacketContents contents2; | 965 PacketContents contents2; |
966 contents2.num_goaway_frames = 1; | 966 contents2.num_goaway_frames = 1; |
967 contents2.num_stream_frames = 1; | 967 contents2.num_stream_frames = 1; |
968 CheckPacketContains(contents2, packet2_); | 968 CheckPacketContains(contents2, packet2_); |
969 } | 969 } |
970 | 970 |
971 } // namespace test | 971 } // namespace test |
972 } // namespace net | 972 } // namespace net |
OLD | NEW |