| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 157 } |
| 158 | 158 |
| 159 vector<TestParams> params; | 159 vector<TestParams> params; |
| 160 // TODO(rtenneti): Add kTBBR after BBR code is checked in. | 160 // TODO(rtenneti): Add kTBBR after BBR code is checked in. |
| 161 // for (const QuicTag congestion_control_tag : {kRENO, kTBBR, kQBIC}) { | 161 // for (const QuicTag congestion_control_tag : {kRENO, kTBBR, kQBIC}) { |
| 162 for (const QuicTag congestion_control_tag : {kRENO, kQBIC}) { | 162 for (const QuicTag congestion_control_tag : {kRENO, kQBIC}) { |
| 163 for (const bool use_fec : {false, true}) { | 163 for (const bool use_fec : {false, true}) { |
| 164 for (const QuicVersionVector& client_versions : client_version_buckets) { | 164 for (const QuicVersionVector& client_versions : client_version_buckets) { |
| 165 // A number of end to end tests fail when stateless rejects are enabled | 165 // A number of end to end tests fail when stateless rejects are enabled |
| 166 // *and* there are more than two QUIC versions. | 166 // *and* there are more than two QUIC versions. |
| 167 // TODO(b/23745998) Re-enable client stateless reject support. | 167 for (bool client_supports_stateless_rejects : {true, false}) { |
| 168 for (bool client_supports_stateless_rejects : {false}) { | 168 for (bool server_uses_stateless_rejects_if_peer_supported : |
| 169 // TODO(b/23745998) Re-enable server stateless reject support. | 169 {true, false}) { |
| 170 for (bool server_uses_stateless_rejects_if_peer_supported : {false}) { | |
| 171 for (bool auto_tune_flow_control_window : {true, false}) { | 170 for (bool auto_tune_flow_control_window : {true, false}) { |
| 172 CHECK(!client_versions.empty()); | 171 CHECK(!client_versions.empty()); |
| 173 // Add an entry for server and client supporting all versions. | 172 // Add an entry for server and client supporting all versions. |
| 174 params.push_back(TestParams( | 173 params.push_back(TestParams( |
| 175 client_versions, all_supported_versions, | 174 client_versions, all_supported_versions, |
| 176 client_versions.front(), use_fec, | 175 client_versions.front(), use_fec, |
| 177 client_supports_stateless_rejects, | 176 client_supports_stateless_rejects, |
| 178 server_uses_stateless_rejects_if_peer_supported, | 177 server_uses_stateless_rejects_if_peer_supported, |
| 179 congestion_control_tag, auto_tune_flow_control_window)); | 178 congestion_control_tag, auto_tune_flow_control_window)); |
| 179 if (client_supports_stateless_rejects && |
| 180 server_uses_stateless_rejects_if_peer_supported) { |
| 181 // TODO(b/23745998) Make stateless reject work with version |
| 182 // negotiation. |
| 183 continue; |
| 184 } |
| 180 | 185 |
| 181 // Test client supporting all versions and server supporting 1 | 186 // Test client supporting all versions and server supporting 1 |
| 182 // version. Simulate an old server and exercise version downgrade | 187 // version. Simulate an old server and exercise version downgrade |
| 183 // in the client. Protocol negotiation should occur. Skip the i = | 188 // in the client. Protocol negotiation should occur. Skip the i = |
| 184 // 0 case because it is essentially the same as the default case. | 189 // 0 case because it is essentially the same as the default case. |
| 185 for (const QuicVersion version : client_versions) { | 190 for (const QuicVersion version : client_versions) { |
| 186 QuicVersionVector server_supported_versions; | 191 QuicVersionVector server_supported_versions; |
| 187 server_supported_versions.push_back(version); | 192 server_supported_versions.push_back(version); |
| 188 params.push_back(TestParams( | 193 params.push_back(TestParams( |
| 189 client_versions, server_supported_versions, | 194 client_versions, server_supported_versions, |
| (...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2086 // There will be buffered data to write in the client's stream. | 2091 // There will be buffered data to write in the client's stream. |
| 2087 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); | 2092 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); |
| 2088 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); | 2093 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); |
| 2089 } | 2094 } |
| 2090 } | 2095 } |
| 2091 | 2096 |
| 2092 } // namespace | 2097 } // namespace |
| 2093 } // namespace test | 2098 } // namespace test |
| 2094 } // namespace tools | 2099 } // namespace tools |
| 2095 } // namespace net | 2100 } // namespace net |
| OLD | NEW |