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

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

Issue 1918953003: Landing Recent QUIC changes until 4/22/2016 14:55 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted SpdyFramerTests missed while mergeing 120451808 Created 4 years, 8 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
« no previous file with comments | « net/quic/quic_framer.cc ('k') | net/quic/quic_headers_stream_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_framer.h" 5 #include "net/quic/quic_framer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 packet_count_(0), 192 packet_count_(0),
193 frame_count_(0), 193 frame_count_(0),
194 complete_packets_(0), 194 complete_packets_(0),
195 accept_packet_(true), 195 accept_packet_(true),
196 accept_public_header_(true) {} 196 accept_public_header_(true) {}
197 197
198 ~TestQuicVisitor() override { 198 ~TestQuicVisitor() override {
199 STLDeleteElements(&stream_frames_); 199 STLDeleteElements(&stream_frames_);
200 STLDeleteElements(&ack_frames_); 200 STLDeleteElements(&ack_frames_);
201 STLDeleteElements(&stop_waiting_frames_); 201 STLDeleteElements(&stop_waiting_frames_);
202 STLDeleteElements(&padding_frames_);
202 STLDeleteElements(&ping_frames_); 203 STLDeleteElements(&ping_frames_);
203 STLDeleteElements(&stream_data_); 204 STLDeleteElements(&stream_data_);
204 } 205 }
205 206
206 void OnError(QuicFramer* f) override { 207 void OnError(QuicFramer* f) override {
207 DVLOG(1) << "QuicFramer Error: " << QuicUtils::ErrorToString(f->error()) 208 DVLOG(1) << "QuicFramer Error: " << QuicUtils::ErrorToString(f->error())
208 << " (" << f->error() << ")"; 209 << " (" << f->error() << ")";
209 ++error_count_; 210 ++error_count_;
210 } 211 }
211 212
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 ack_frames_.push_back(new QuicAckFrame(frame)); 266 ack_frames_.push_back(new QuicAckFrame(frame));
266 return true; 267 return true;
267 } 268 }
268 269
269 bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override { 270 bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
270 ++frame_count_; 271 ++frame_count_;
271 stop_waiting_frames_.push_back(new QuicStopWaitingFrame(frame)); 272 stop_waiting_frames_.push_back(new QuicStopWaitingFrame(frame));
272 return true; 273 return true;
273 } 274 }
274 275
276 bool OnPaddingFrame(const QuicPaddingFrame& frame) override {
277 padding_frames_.push_back(new QuicPaddingFrame(frame));
278 return true;
279 }
280
275 bool OnPingFrame(const QuicPingFrame& frame) override { 281 bool OnPingFrame(const QuicPingFrame& frame) override {
276 ++frame_count_; 282 ++frame_count_;
277 ping_frames_.push_back(new QuicPingFrame(frame)); 283 ping_frames_.push_back(new QuicPingFrame(frame));
278 return true; 284 return true;
279 } 285 }
280 286
281 void OnPacketComplete() override { ++complete_packets_; } 287 void OnPacketComplete() override { ++complete_packets_; }
282 288
283 bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override { 289 bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
284 rst_stream_frame_ = frame; 290 rst_stream_frame_ = frame;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 bool accept_packet_; 325 bool accept_packet_;
320 bool accept_public_header_; 326 bool accept_public_header_;
321 327
322 std::unique_ptr<QuicPacketHeader> header_; 328 std::unique_ptr<QuicPacketHeader> header_;
323 std::unique_ptr<QuicPacketPublicHeader> public_header_; 329 std::unique_ptr<QuicPacketPublicHeader> public_header_;
324 std::unique_ptr<QuicPublicResetPacket> public_reset_packet_; 330 std::unique_ptr<QuicPublicResetPacket> public_reset_packet_;
325 std::unique_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_; 331 std::unique_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_;
326 vector<QuicStreamFrame*> stream_frames_; 332 vector<QuicStreamFrame*> stream_frames_;
327 vector<QuicAckFrame*> ack_frames_; 333 vector<QuicAckFrame*> ack_frames_;
328 vector<QuicStopWaitingFrame*> stop_waiting_frames_; 334 vector<QuicStopWaitingFrame*> stop_waiting_frames_;
335 vector<QuicPaddingFrame*> padding_frames_;
329 vector<QuicPingFrame*> ping_frames_; 336 vector<QuicPingFrame*> ping_frames_;
330 QuicRstStreamFrame rst_stream_frame_; 337 QuicRstStreamFrame rst_stream_frame_;
331 QuicConnectionCloseFrame connection_close_frame_; 338 QuicConnectionCloseFrame connection_close_frame_;
332 QuicGoAwayFrame goaway_frame_; 339 QuicGoAwayFrame goaway_frame_;
333 QuicWindowUpdateFrame window_update_frame_; 340 QuicWindowUpdateFrame window_update_frame_;
334 QuicBlockedFrame blocked_frame_; 341 QuicBlockedFrame blocked_frame_;
335 QuicPathCloseFrame path_close_frame_; 342 QuicPathCloseFrame path_close_frame_;
336 vector<string*> stream_data_; 343 vector<string*> stream_data_;
337 }; 344 };
338 345
(...skipping 4869 matching lines...) Expand 10 before | Expand all | Expand 10 after
5208 'o', ' ', 'w', 'o', 5215 'o', ' ', 'w', 'o',
5209 'r', 'l', 'd', '!', 5216 'r', 'l', 'd', '!',
5210 }; 5217 };
5211 // clang-format on 5218 // clang-format on
5212 5219
5213 QuicFramerFuzzFunc(packet, arraysize(packet)); 5220 QuicFramerFuzzFunc(packet, arraysize(packet));
5214 } 5221 }
5215 5222
5216 } // namespace test 5223 } // namespace test
5217 } // namespace net 5224 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_framer.cc ('k') | net/quic/quic_headers_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698