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/chromium/quic_stream_factory.h" | 5 #include "net/quic/chromium/quic_stream_factory.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 << (p.enable_connection_racing ? "true" : "false") << " }"; | 106 << (p.enable_connection_racing ? "true" : "false") << " }"; |
107 return os; | 107 return os; |
108 } | 108 } |
109 | 109 |
110 QuicVersion version; | 110 QuicVersion version; |
111 bool enable_connection_racing; | 111 bool enable_connection_racing; |
112 }; | 112 }; |
113 | 113 |
114 vector<TestParams> GetTestParams() { | 114 vector<TestParams> GetTestParams() { |
115 vector<TestParams> params; | 115 vector<TestParams> params; |
116 QuicVersionVector all_supported_versions = QuicSupportedVersions(); | 116 QuicVersionVector all_supported_versions = AllSupportedVersions(); |
117 for (const QuicVersion version : all_supported_versions) { | 117 for (const QuicVersion version : all_supported_versions) { |
118 params.push_back(TestParams{version, false}); | 118 params.push_back(TestParams{version, false}); |
119 params.push_back(TestParams{version, true}); | 119 params.push_back(TestParams{version, true}); |
120 } | 120 } |
121 return params; | 121 return params; |
122 } | 122 } |
123 | 123 |
124 // Run QuicStreamFactoryWithDestinationTest instances with all value | 124 // Run QuicStreamFactoryWithDestinationTest instances with all value |
125 // combinations of version, enable_connection_racting, and destination_type. | 125 // combinations of version, enable_connection_racting, and destination_type. |
126 struct PoolingTestParams { | 126 struct PoolingTestParams { |
(...skipping 18 matching lines...) Expand all Loading... |
145 return os; | 145 return os; |
146 } | 146 } |
147 | 147 |
148 QuicVersion version; | 148 QuicVersion version; |
149 bool enable_connection_racing; | 149 bool enable_connection_racing; |
150 DestinationType destination_type; | 150 DestinationType destination_type; |
151 }; | 151 }; |
152 | 152 |
153 vector<PoolingTestParams> GetPoolingTestParams() { | 153 vector<PoolingTestParams> GetPoolingTestParams() { |
154 vector<PoolingTestParams> params; | 154 vector<PoolingTestParams> params; |
155 QuicVersionVector all_supported_versions = QuicSupportedVersions(); | 155 QuicVersionVector all_supported_versions = AllSupportedVersions(); |
156 for (const QuicVersion version : all_supported_versions) { | 156 for (const QuicVersion version : all_supported_versions) { |
157 params.push_back(PoolingTestParams{version, false, SAME_AS_FIRST}); | 157 params.push_back(PoolingTestParams{version, false, SAME_AS_FIRST}); |
158 params.push_back(PoolingTestParams{version, false, SAME_AS_SECOND}); | 158 params.push_back(PoolingTestParams{version, false, SAME_AS_SECOND}); |
159 params.push_back(PoolingTestParams{version, false, DIFFERENT}); | 159 params.push_back(PoolingTestParams{version, false, DIFFERENT}); |
160 params.push_back(PoolingTestParams{version, true, SAME_AS_FIRST}); | 160 params.push_back(PoolingTestParams{version, true, SAME_AS_FIRST}); |
161 params.push_back(PoolingTestParams{version, true, SAME_AS_SECOND}); | 161 params.push_back(PoolingTestParams{version, true, SAME_AS_SECOND}); |
162 params.push_back(PoolingTestParams{version, true, DIFFERENT}); | 162 params.push_back(PoolingTestParams{version, true, DIFFERENT}); |
163 } | 163 } |
164 return params; | 164 return params; |
165 } | 165 } |
(...skipping 4951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5117 // Clear all cached states. | 5117 // Clear all cached states. |
5118 factory_->ClearCachedStatesInCryptoConfig( | 5118 factory_->ClearCachedStatesInCryptoConfig( |
5119 base::Callback<bool(const GURL&)>()); | 5119 base::Callback<bool(const GURL&)>()); |
5120 EXPECT_TRUE(test_cases[0].state->certs().empty()); | 5120 EXPECT_TRUE(test_cases[0].state->certs().empty()); |
5121 EXPECT_TRUE(test_cases[1].state->certs().empty()); | 5121 EXPECT_TRUE(test_cases[1].state->certs().empty()); |
5122 EXPECT_TRUE(test_cases[2].state->certs().empty()); | 5122 EXPECT_TRUE(test_cases[2].state->certs().empty()); |
5123 } | 5123 } |
5124 | 5124 |
5125 } // namespace test | 5125 } // namespace test |
5126 } // namespace net | 5126 } // namespace net |
OLD | NEW |