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_packet_creator.h" | 5 #include "net/quic/core/quic_packet_creator.h" |
6 | 6 |
7 #include <cstdint> | 7 #include <cstdint> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 QuicVersion version; | 57 QuicVersion version; |
58 QuicConnectionIdLength connection_id_length; | 58 QuicConnectionIdLength connection_id_length; |
59 bool version_serialization; | 59 bool version_serialization; |
60 }; | 60 }; |
61 | 61 |
62 // Constructs various test permutations. | 62 // Constructs various test permutations. |
63 vector<TestParams> GetTestParams() { | 63 vector<TestParams> GetTestParams() { |
64 vector<TestParams> params; | 64 vector<TestParams> params; |
65 constexpr QuicConnectionIdLength kMax = PACKET_8BYTE_CONNECTION_ID; | 65 constexpr QuicConnectionIdLength kMax = PACKET_8BYTE_CONNECTION_ID; |
66 QuicVersionVector all_supported_versions = QuicSupportedVersions(); | 66 QuicVersionVector all_supported_versions = AllSupportedVersions(); |
67 for (size_t i = 0; i < all_supported_versions.size(); ++i) { | 67 for (size_t i = 0; i < all_supported_versions.size(); ++i) { |
68 params.push_back(TestParams(all_supported_versions[i], true, kMax)); | 68 params.push_back(TestParams(all_supported_versions[i], true, kMax)); |
69 params.push_back(TestParams(all_supported_versions[i], false, kMax)); | 69 params.push_back(TestParams(all_supported_versions[i], false, kMax)); |
70 } | 70 } |
71 params.push_back( | 71 params.push_back( |
72 TestParams(all_supported_versions[0], true, PACKET_0BYTE_CONNECTION_ID)); | 72 TestParams(all_supported_versions[0], true, PACKET_0BYTE_CONNECTION_ID)); |
73 params.push_back(TestParams(all_supported_versions[0], true, kMax)); | 73 params.push_back(TestParams(all_supported_versions[0], true, kMax)); |
74 return params; | 74 return params; |
75 } | 75 } |
76 | 76 |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 EXPECT_CALL(delegate_, | 1328 EXPECT_CALL(delegate_, |
1329 OnUnrecoverableError(QUIC_CRYPTO_CHLO_TOO_LARGE, _, _)); | 1329 OnUnrecoverableError(QUIC_CRYPTO_CHLO_TOO_LARGE, _, _)); |
1330 EXPECT_DFATAL( | 1330 EXPECT_DFATAL( |
1331 creator_.ConsumeData(1u, data_iovec, 0u, 0u, false, false, &frame), | 1331 creator_.ConsumeData(1u, data_iovec, 0u, 0u, false, false, &frame), |
1332 "Client hello won't fit in a single packet."); | 1332 "Client hello won't fit in a single packet."); |
1333 } | 1333 } |
1334 | 1334 |
1335 } // namespace | 1335 } // namespace |
1336 } // namespace test | 1336 } // namespace test |
1337 } // namespace net | 1337 } // namespace net |
OLD | NEW |