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

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 2236463004: Rename QuicSupportedVersions to QuicAllSupportedVersions. Add QuicCurrentSupportedVersions which re… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129437595
Patch Set: update more files outside net/ Created 4 years, 4 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/tools/quic/chlo_extractor_test.cc ('k') | net/tools/quic/quic_client_bin.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 <stddef.h> 5 #include <stddef.h>
6 #include <sys/epoll.h> 6 #include <sys/epoll.h>
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // Constructs various test permutations. 150 // Constructs various test permutations.
151 vector<TestParams> GetTestParams() { 151 vector<TestParams> GetTestParams() {
152 // Divide the versions into buckets in which the intra-frame format 152 // Divide the versions into buckets in which the intra-frame format
153 // is compatible. When clients encounter QUIC version negotiation 153 // is compatible. When clients encounter QUIC version negotiation
154 // they simply retransmit all packets using the new version's 154 // they simply retransmit all packets using the new version's
155 // QUIC framing. However, they are unable to change the intra-frame 155 // QUIC framing. However, they are unable to change the intra-frame
156 // layout (for example to change SPDY/4 headers to SPDY/3). So 156 // layout (for example to change SPDY/4 headers to SPDY/3). So
157 // these tests need to ensure that clients are never attempting 157 // these tests need to ensure that clients are never attempting
158 // to do 0-RTT across incompatible versions. Chromium only supports 158 // to do 0-RTT across incompatible versions. Chromium only supports
159 // a single version at a time anyway. :) 159 // a single version at a time anyway. :)
160 QuicVersionVector all_supported_versions = QuicSupportedVersions(); 160 QuicVersionVector all_supported_versions = AllSupportedVersions();
161 QuicVersionVector version_buckets[4]; 161 QuicVersionVector version_buckets[4];
162 162
163 for (const QuicVersion version : all_supported_versions) { 163 for (const QuicVersion version : all_supported_versions) {
164 if (version <= QUIC_VERSION_30) { 164 if (version <= QUIC_VERSION_30) {
165 // Versions: 30 165 // Versions: 30
166 // v26 adds a hash of the expected leaf cert in the XLCT tag. 166 // v26 adds a hash of the expected leaf cert in the XLCT tag.
167 version_buckets[0].push_back(version); 167 version_buckets[0].push_back(version);
168 } else if (version <= QUIC_VERSION_32) { 168 } else if (version <= QUIC_VERSION_32) {
169 // Versions: 31-32 169 // Versions: 31-32
170 // v31 adds a hash of the CHLO into the proof signature. 170 // v31 adds a hash of the CHLO into the proof signature.
(...skipping 2706 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 EXPECT_EQ(kBarResponseBody, client_->response_body()); 2877 EXPECT_EQ(kBarResponseBody, client_->response_body());
2878 QuicConnectionStats client_stats = 2878 QuicConnectionStats client_stats =
2879 client_->client()->session()->connection()->GetStats(); 2879 client_->client()->session()->connection()->GetStats();
2880 EXPECT_EQ(0u, client_stats.packets_lost); 2880 EXPECT_EQ(0u, client_stats.packets_lost);
2881 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); 2881 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos());
2882 } 2882 }
2883 2883
2884 } // namespace 2884 } // namespace
2885 } // namespace test 2885 } // namespace test
2886 } // namespace net 2886 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/chlo_extractor_test.cc ('k') | net/tools/quic/quic_client_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698