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_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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 QuicBlockedFrame blocked_frame_; | 344 QuicBlockedFrame blocked_frame_; |
345 QuicPathCloseFrame path_close_frame_; | 345 QuicPathCloseFrame path_close_frame_; |
346 vector<string*> stream_data_; | 346 vector<string*> stream_data_; |
347 }; | 347 }; |
348 | 348 |
349 class QuicFramerTest : public ::testing::TestWithParam<QuicVersion> { | 349 class QuicFramerTest : public ::testing::TestWithParam<QuicVersion> { |
350 public: | 350 public: |
351 QuicFramerTest() | 351 QuicFramerTest() |
352 : encrypter_(new test::TestEncrypter()), | 352 : encrypter_(new test::TestEncrypter()), |
353 decrypter_(new test::TestDecrypter()), | 353 decrypter_(new test::TestDecrypter()), |
354 start_(QuicTime::Zero().Add(QuicTime::Delta::FromMicroseconds(0x10))), | 354 start_(QuicTime::Zero() + QuicTime::Delta::FromMicroseconds(0x10)), |
355 framer_(QuicSupportedVersions(), start_, Perspective::IS_SERVER) { | 355 framer_(QuicSupportedVersions(), start_, Perspective::IS_SERVER) { |
356 version_ = GetParam(); | 356 version_ = GetParam(); |
357 framer_.set_version(version_); | 357 framer_.set_version(version_); |
358 framer_.SetDecrypter(ENCRYPTION_NONE, decrypter_); | 358 framer_.SetDecrypter(ENCRYPTION_NONE, decrypter_); |
359 framer_.SetEncrypter(ENCRYPTION_NONE, encrypter_); | 359 framer_.SetEncrypter(ENCRYPTION_NONE, encrypter_); |
360 framer_.set_visitor(&visitor_); | 360 framer_.set_visitor(&visitor_); |
361 framer_.set_received_entropy_calculator(&entropy_calculator_); | 361 framer_.set_received_entropy_calculator(&entropy_calculator_); |
362 } | 362 } |
363 | 363 |
364 // Helper function to get unsigned char representation of digit in the | 364 // Helper function to get unsigned char representation of digit in the |
(...skipping 6818 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 |