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

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 848443004: Adds QUIC_VERSION_24 which uses SPDY/4 header compression instead of SPDY/3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0114
Patch Set: Changes to make version 24 to work with chromium unittests Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_test_packet_maker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cd5f1c05b09b9eee3366c298e91fc47f21e01f08..1104528c49d376fbeb29957c78218ba554fe60ea 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -117,6 +117,15 @@ vector<TestParams> GetTestParams() {
// TODO(rtenneti): Add kTBBR after BBR code is checked in.
// QuicTag congestion_control_tags[] = {kRENO, kTBBR, kQBIC};
QuicTag congestion_control_tags[] = {kRENO, kQBIC};
+ QuicVersionVector spdy3_versions;
+ QuicVersionVector spdy4_versions;
+ for (QuicVersion version : all_supported_versions) {
+ if (version > QUIC_VERSION_23) {
+ spdy4_versions.push_back(version);
+ } else {
+ spdy3_versions.push_back(version);
+ }
+ }
for (size_t congestion_control_index = 0;
congestion_control_index < arraysize(congestion_control_tags);
congestion_control_index++) {
@@ -124,27 +133,29 @@ vector<TestParams> GetTestParams() {
congestion_control_tags[congestion_control_index];
for (int use_fec = 0; use_fec < 2; ++use_fec) {
for (int use_pacing = 0; use_pacing < 2; ++use_pacing) {
- // Add an entry for server and client supporting all versions.
- params.push_back(TestParams(all_supported_versions,
- all_supported_versions,
- all_supported_versions[0],
- use_pacing != 0,
- use_fec != 0,
- congestion_control_tag));
-
- // 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 < all_supported_versions.size(); ++i) {
- QuicVersionVector server_supported_versions;
- server_supported_versions.push_back(all_supported_versions[i]);
- params.push_back(TestParams(all_supported_versions,
- server_supported_versions,
- server_supported_versions[0],
- use_pacing != 0,
- use_fec != 0,
- congestion_control_tag));
+ for (int spdy_version = 3; spdy_version <= 4; ++spdy_version) {
+ const QuicVersionVector* client_versions =
+ spdy_version == 3 ? &spdy3_versions : &spdy4_versions;
+ // Add an entry for server and client supporting all versions.
+ params.push_back(TestParams(*client_versions, all_supported_versions,
+ (*client_versions)[0], use_pacing != 0,
+ use_fec != 0, congestion_control_tag));
+
+ // 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 (QuicVersion version : *client_versions) {
+ QuicVersionVector server_supported_versions;
+ server_supported_versions.push_back(version);
+ params.push_back(
+ TestParams(*client_versions, server_supported_versions,
+ server_supported_versions[0], use_pacing != 0,
+ use_fec != 0, congestion_control_tag));
+ }
}
}
}
« no previous file with comments | « net/quic/test_tools/quic_test_packet_maker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698