Index: net/tools/quic/end_to_end_test.cc |
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc |
index f757686ea72cc2e57253cb6c113adc070f470c23..68cb1a392e3f1c74ec7719499450a4a5d317c5cc 100644 |
--- a/net/tools/quic/end_to_end_test.cc |
+++ b/net/tools/quic/end_to_end_test.cc |
@@ -96,14 +96,16 @@ struct TestParams { |
QuicVersion negotiated_version, |
bool client_supports_stateless_rejects, |
bool server_uses_stateless_rejects_if_peer_supported, |
- QuicTag congestion_control_tag) |
+ QuicTag congestion_control_tag, |
+ bool disable_hpack_dynamic_table) |
: client_supported_versions(client_supported_versions), |
server_supported_versions(server_supported_versions), |
negotiated_version(negotiated_version), |
client_supports_stateless_rejects(client_supports_stateless_rejects), |
server_uses_stateless_rejects_if_peer_supported( |
server_uses_stateless_rejects_if_peer_supported), |
- congestion_control_tag(congestion_control_tag) {} |
+ congestion_control_tag(congestion_control_tag), |
+ disable_hpack_dynamic_table(disable_hpack_dynamic_table) {} |
friend ostream& operator<<(ostream& os, const TestParams& p) { |
os << "{ server_supported_versions: " |
@@ -116,7 +118,9 @@ struct TestParams { |
os << " server_uses_stateless_rejects_if_peer_supported: " |
<< p.server_uses_stateless_rejects_if_peer_supported; |
os << " congestion_control_tag: " |
- << QuicUtils::TagToString(p.congestion_control_tag) << " }"; |
+ << QuicUtils::TagToString(p.congestion_control_tag); |
+ os << " disable_hpack_dynamic_table: " << p.disable_hpack_dynamic_table |
+ << " }"; |
return os; |
} |
@@ -126,6 +130,7 @@ struct TestParams { |
bool client_supports_stateless_rejects; |
bool server_uses_stateless_rejects_if_peer_supported; |
QuicTag congestion_control_tag; |
+ bool disable_hpack_dynamic_table; |
}; |
// Constructs various test permutations. |
@@ -156,53 +161,58 @@ vector<TestParams> GetTestParams() { |
for (bool client_supports_stateless_rejects : {true, false}) { |
// TODO(rtenneti): Add kTBBR after BBR code is checked in. |
for (const QuicTag congestion_control_tag : {kRENO, kQBIC}) { |
- const int kMaxEnabledOptions = 4; |
- int enabled_options = 0; |
- if (congestion_control_tag != kQBIC) { |
- ++enabled_options; |
- } |
- if (client_supports_stateless_rejects) { |
- ++enabled_options; |
- } |
- if (server_uses_stateless_rejects_if_peer_supported) { |
- ++enabled_options; |
- } |
- CHECK_GE(kMaxEnabledOptions, enabled_options); |
- |
- // Run tests with no options, a single option, or all the options |
- // enabled to avoid a combinatorial explosion. |
- if (enabled_options > 1 && enabled_options < kMaxEnabledOptions) { |
- continue; |
- } |
+ for (bool disable_hpack_dynamic_table : {true, false}) { |
+ const int kMaxEnabledOptions = 5; |
+ int enabled_options = 0; |
+ if (congestion_control_tag != kQBIC) { |
+ ++enabled_options; |
+ } |
+ if (disable_hpack_dynamic_table) { |
+ ++enabled_options; |
+ } |
+ if (client_supports_stateless_rejects) { |
+ ++enabled_options; |
+ } |
+ if (server_uses_stateless_rejects_if_peer_supported) { |
+ ++enabled_options; |
+ } |
+ CHECK_GE(kMaxEnabledOptions, enabled_options); |
- for (const QuicVersionVector& client_versions : version_buckets) { |
- CHECK(!client_versions.empty()); |
- // Add an entry for server and client supporting all versions. |
- params.push_back(TestParams( |
- client_versions, all_supported_versions, client_versions.front(), |
- client_supports_stateless_rejects, |
- server_uses_stateless_rejects_if_peer_supported, |
- congestion_control_tag)); |
- |
- // Run version negotiation tests tests with no options, or all |
- // the options enabled to avoid a combinatorial explosion. |
- if (enabled_options > 0 && enabled_options < kMaxEnabledOptions) { |
+ // Run tests with no options, a single option, or all the options |
+ // enabled to avoid a combinatorial explosion. |
+ if (enabled_options > 1 && enabled_options < kMaxEnabledOptions) { |
continue; |
} |
- // Test client supporting all versions and server supporting 1 |
- // version. Simulate an old server and exercise version downgrade |
- // in the client. Protocol negotiation should occur. Skip the i = |
- // 0 case because it is essentially the same as the default case. |
- for (size_t i = 1; i < client_versions.size(); ++i) { |
- QuicVersionVector server_supported_versions; |
- server_supported_versions.push_back(client_versions[i]); |
- params.push_back( |
- TestParams(client_versions, server_supported_versions, |
- server_supported_versions.front(), |
- client_supports_stateless_rejects, |
- server_uses_stateless_rejects_if_peer_supported, |
- congestion_control_tag)); |
+ for (const QuicVersionVector& client_versions : version_buckets) { |
+ CHECK(!client_versions.empty()); |
+ // Add an entry for server and client supporting all versions. |
+ params.push_back(TestParams( |
+ client_versions, all_supported_versions, |
+ client_versions.front(), client_supports_stateless_rejects, |
+ server_uses_stateless_rejects_if_peer_supported, |
+ congestion_control_tag, disable_hpack_dynamic_table)); |
+ |
+ // Run version negotiation tests tests with no options, or all |
ramant (doing other things)
2016/04/11 18:17:49
overly nit: should "tests tests" be "tests"?
|
+ // the options enabled to avoid a combinatorial explosion. |
+ if (enabled_options > 0 && enabled_options < kMaxEnabledOptions) { |
+ continue; |
+ } |
+ |
+ // Test client supporting all versions and server supporting 1 |
+ // version. Simulate an old server and exercise version downgrade |
+ // in the client. Protocol negotiation should occur. Skip the i = |
+ // 0 case because it is essentially the same as the default case. |
+ for (size_t i = 1; i < client_versions.size(); ++i) { |
+ QuicVersionVector server_supported_versions; |
+ server_supported_versions.push_back(client_versions[i]); |
+ params.push_back(TestParams( |
+ client_versions, server_supported_versions, |
+ server_supported_versions.front(), |
+ client_supports_stateless_rejects, |
+ server_uses_stateless_rejects_if_peer_supported, |
+ congestion_control_tag, disable_hpack_dynamic_table)); |
+ } |
} |
} |
} |