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

Side by Side Diff: net/quic/test_tools/quic_test_utils.cc

Issue 2430973004: Landing Recent QUIC changes until 10:38 AM, Oct 17, 2016 UTC-4 (Closed)
Patch Set: Improving flagsaver logging Created 4 years, 2 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/test_tools/quic_session_peer.cc ('k') | net/quic/test_tools/simulator/simulator.h » ('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/test_tools/quic_test_utils.h" 5 #include "net/quic/test_tools/quic_test_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Re-construct the data packet with data ownership. 91 // Re-construct the data packet with data ownership.
92 return new QuicPacket(buffer, length, /* owns_buffer */ true, 92 return new QuicPacket(buffer, length, /* owns_buffer */ true,
93 header.public_header.connection_id_length, 93 header.public_header.connection_id_length,
94 header.public_header.version_flag, 94 header.public_header.version_flag,
95 header.public_header.multipath_flag, 95 header.public_header.multipath_flag,
96 header.public_header.nonce != nullptr, 96 header.public_header.nonce != nullptr,
97 header.public_header.packet_number_length); 97 header.public_header.packet_number_length);
98 } 98 }
99 99
100 QuicFlagSaver::QuicFlagSaver() { 100 QuicFlagSaver::QuicFlagSaver() {
101 #define QUIC_FLAG(type, flag, value) CHECK_EQ(value, flag); 101 #define QUIC_FLAG(type, flag, value) \
102 CHECK_EQ(value, flag) << "Flag set to an expected value. A prior test is " \
103 "likely setting a flag " \
104 << "without using a QuicFlagSaver";
102 #include "net/quic/core/quic_flags_list.h" 105 #include "net/quic/core/quic_flags_list.h"
103 #undef QUIC_FLAG 106 #undef QUIC_FLAG
104 } 107 }
105 108
106 QuicFlagSaver::~QuicFlagSaver() { 109 QuicFlagSaver::~QuicFlagSaver() {
107 #define QUIC_FLAG(type, flag, value) flag = value; 110 #define QUIC_FLAG(type, flag, value) flag = value;
108 #include "net/quic/core/quic_flags_list.h" 111 #include "net/quic/core/quic_flags_list.h"
109 #undef QUIC_FLAG 112 #undef QUIC_FLAG
110 } 113 }
111 114
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 // strike register worries that we've just overflowed a uint32_t time. 928 // strike register worries that we've just overflowed a uint32_t time.
926 (*server_connection)->AdvanceTime(connection_start_time); 929 (*server_connection)->AdvanceTime(connection_start_time);
927 } 930 }
928 931
929 QuicStreamId QuicClientDataStreamId(int i) { 932 QuicStreamId QuicClientDataStreamId(int i) {
930 return kClientDataStreamId1 + 2 * i; 933 return kClientDataStreamId1 + 2 * i;
931 } 934 }
932 935
933 } // namespace test 936 } // namespace test
934 } // namespace net 937 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_session_peer.cc ('k') | net/quic/test_tools/simulator/simulator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698