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

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

Issue 2306173003: Add a new QuicFlagSaver class for saving/restoring the values of QUIC flags in tests. (Closed)
Patch Set: Better Created 4 years, 3 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/core/quic_flags_list.h ('k') | net/quic/core/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/core/quic_framer.h" 5 #include "net/quic/core/quic_framer.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 const QuicFrames& frames) { 491 const QuicFrames& frames) {
492 return BuildUnsizedDataPacket(&framer_, header, frames); 492 return BuildUnsizedDataPacket(&framer_, header, frames);
493 } 493 }
494 494
495 QuicPacket* BuildDataPacket(const QuicPacketHeader& header, 495 QuicPacket* BuildDataPacket(const QuicPacketHeader& header,
496 const QuicFrames& frames, 496 const QuicFrames& frames,
497 size_t packet_size) { 497 size_t packet_size) {
498 return BuildUnsizedDataPacket(&framer_, header, frames, packet_size); 498 return BuildUnsizedDataPacket(&framer_, header, frames, packet_size);
499 } 499 }
500 500
501 QuicFlagSaver flags_; // Save/restore all QUIC flag values.
501 test::TestEncrypter* encrypter_; 502 test::TestEncrypter* encrypter_;
502 test::TestDecrypter* decrypter_; 503 test::TestDecrypter* decrypter_;
503 QuicVersion version_; 504 QuicVersion version_;
504 QuicTime start_; 505 QuicTime start_;
505 QuicFramer framer_; 506 QuicFramer framer_;
506 test::TestQuicVisitor visitor_; 507 test::TestQuicVisitor visitor_;
507 test::TestEntropyCalculator entropy_calculator_; 508 test::TestEntropyCalculator entropy_calculator_;
508 }; 509 };
509 510
510 // Run all framer tests with all supported versions of QUIC. 511 // Run all framer tests with all supported versions of QUIC.
(...skipping 6676 matching lines...) Expand 10 before | Expand all | Expand 10 after
7187 'o', ' ', 'w', 'o', 7188 'o', ' ', 'w', 'o',
7188 'r', 'l', 'd', '!', 7189 'r', 'l', 'd', '!',
7189 }; 7190 };
7190 // clang-format on 7191 // clang-format on
7191 7192
7192 QuicFramerFuzzFunc(packet, arraysize(packet)); 7193 QuicFramerFuzzFunc(packet, arraysize(packet));
7193 } 7194 }
7194 7195
7195 } // namespace test 7196 } // namespace test
7196 } // namespace net 7197 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_headers_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698