| 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/core/quic_framer.h" | 5 #include "net/quic/core/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 Loading... |
| 192 TestQuicVisitor() | 192 TestQuicVisitor() |
| 193 : error_count_(0), | 193 : error_count_(0), |
| 194 version_mismatch_(0), | 194 version_mismatch_(0), |
| 195 packet_count_(0), | 195 packet_count_(0), |
| 196 frame_count_(0), | 196 frame_count_(0), |
| 197 complete_packets_(0), | 197 complete_packets_(0), |
| 198 accept_packet_(true), | 198 accept_packet_(true), |
| 199 accept_public_header_(true) {} | 199 accept_public_header_(true) {} |
| 200 | 200 |
| 201 ~TestQuicVisitor() override { | 201 ~TestQuicVisitor() override { |
| 202 STLDeleteElements(&stream_frames_); | 202 base::STLDeleteElements(&stream_frames_); |
| 203 STLDeleteElements(&ack_frames_); | 203 base::STLDeleteElements(&ack_frames_); |
| 204 STLDeleteElements(&stop_waiting_frames_); | 204 base::STLDeleteElements(&stop_waiting_frames_); |
| 205 STLDeleteElements(&padding_frames_); | 205 base::STLDeleteElements(&padding_frames_); |
| 206 STLDeleteElements(&ping_frames_); | 206 base::STLDeleteElements(&ping_frames_); |
| 207 STLDeleteElements(&stream_data_); | 207 base::STLDeleteElements(&stream_data_); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void OnError(QuicFramer* f) override { | 210 void OnError(QuicFramer* f) override { |
| 211 DVLOG(1) << "QuicFramer Error: " << QuicUtils::ErrorToString(f->error()) | 211 DVLOG(1) << "QuicFramer Error: " << QuicUtils::ErrorToString(f->error()) |
| 212 << " (" << f->error() << ")"; | 212 << " (" << f->error() << ")"; |
| 213 ++error_count_; | 213 ++error_count_; |
| 214 } | 214 } |
| 215 | 215 |
| 216 void OnPacket() override {} | 216 void OnPacket() override {} |
| 217 | 217 |
| (...skipping 6965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7183 'o', ' ', 'w', 'o', | 7183 'o', ' ', 'w', 'o', |
| 7184 'r', 'l', 'd', '!', | 7184 'r', 'l', 'd', '!', |
| 7185 }; | 7185 }; |
| 7186 // clang-format on | 7186 // clang-format on |
| 7187 | 7187 |
| 7188 QuicFramerFuzzFunc(packet, arraysize(packet)); | 7188 QuicFramerFuzzFunc(packet, arraysize(packet)); |
| 7189 } | 7189 } |
| 7190 | 7190 |
| 7191 } // namespace test | 7191 } // namespace test |
| 7192 } // namespace net | 7192 } // namespace net |
| OLD | NEW |