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

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 2359503003: Landing Recent QUIC changes until 9:58 AM, Sep 17, 2016 UTC (Closed)
Patch Set: Reverted flag flip. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « net/quic/test_tools/quic_packet_creator_peer.cc ('k') | net/tools/quic/stateless_rejector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <sys/epoll.h> 6 #include <sys/epoll.h>
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 client_versions, server_supported_versions, 280 client_versions, server_supported_versions,
281 server_supported_versions.front(), 281 server_supported_versions.front(),
282 client_supports_stateless_rejects, 282 client_supports_stateless_rejects,
283 server_uses_stateless_rejects_if_peer_supported, 283 server_uses_stateless_rejects_if_peer_supported,
284 congestion_control_tag, disable_hpack_dynamic_table, 284 congestion_control_tag, disable_hpack_dynamic_table,
285 force_hol_blocking, use_cheap_stateless_reject, 285 force_hol_blocking, use_cheap_stateless_reject,
286 buffer_packet_till_chlo, small_client_mtu)); 286 buffer_packet_till_chlo, small_client_mtu));
287 } // End of version for loop. 287 } // End of version for loop.
288 } // End of 2nd version for loop. 288 } // End of 2nd version for loop.
289 } // End of small_client_mtu loop. 289 } // End of small_client_mtu loop.
290 } // End of buffer_packet_till_chlo loop. 290 } // End of buffer_packet_till_chlo loop.
291 } // End of use_cheap_stateless_reject for loop. 291 } // End of use_cheap_stateless_reject for loop.
292 } // End of force_hol_blocking loop. 292 } // End of force_hol_blocking loop.
293 } // End of disable_hpack_dynamic_table for loop. 293 } // End of disable_hpack_dynamic_table for loop.
294 } // End of congestion_control_tag for loop. 294 } // End of congestion_control_tag for loop.
295 } // End of client_supports_stateless_rejects for loop. 295 } // End of client_supports_stateless_rejects for loop.
296 CHECK_EQ(kMaxEnabledOptions, max_enabled_options); 296 CHECK_EQ(kMaxEnabledOptions, max_enabled_options);
297 } // End of server_uses_stateless_rejects_if_peer_supported for loop. 297 } // End of server_uses_stateless_rejects_if_peer_supported for loop.
298 return params; 298 return params;
299 } 299 }
300 300
301 class SmallMtuPacketReader : public QuicPacketReader { 301 class SmallMtuPacketReader : public QuicPacketReader {
302 public: 302 public:
303 bool ReadAndDispatchPackets(int fd, 303 bool ReadAndDispatchPackets(int fd,
304 int port, 304 int port,
305 bool potentially_small_mtu, 305 bool potentially_small_mtu,
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 FLAGS_quic_enable_multipath = false; 1352 FLAGS_quic_enable_multipath = false;
1353 ASSERT_TRUE(Initialize()); 1353 ASSERT_TRUE(Initialize());
1354 client_->client()->WaitForCryptoHandshakeConfirmed(); 1354 client_->client()->WaitForCryptoHandshakeConfirmed();
1355 1355
1356 CongestionControlType expected_congestion_control_type = kReno; 1356 CongestionControlType expected_congestion_control_type = kReno;
1357 switch (GetParam().congestion_control_tag) { 1357 switch (GetParam().congestion_control_tag) {
1358 case kRENO: 1358 case kRENO:
1359 expected_congestion_control_type = kReno; 1359 expected_congestion_control_type = kReno;
1360 break; 1360 break;
1361 case kTBBR: 1361 case kTBBR:
1362 expected_congestion_control_type = kBBR; 1362 // TODO(vasilvv): switch this back to kBBR when new BBR implementation is
1363 // in.
1364 expected_congestion_control_type = kCubic;
1363 break; 1365 break;
1364 case kQBIC: 1366 case kQBIC:
1365 expected_congestion_control_type = kCubic; 1367 expected_congestion_control_type = kCubic;
1366 break; 1368 break;
1367 default: 1369 default:
1368 DLOG(FATAL) << "Unexpected congestion control tag"; 1370 DLOG(FATAL) << "Unexpected congestion control tag";
1369 } 1371 }
1370 1372
1371 server_thread_->Pause(); 1373 server_thread_->Pause();
1372 EXPECT_EQ(expected_congestion_control_type, 1374 EXPECT_EQ(expected_congestion_control_type,
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 } 2761 }
2760 2762
2761 // Because of server push, client gets all pushed resources without actually 2763 // Because of server push, client gets all pushed resources without actually
2762 // sending requests for them. 2764 // sending requests for them.
2763 EXPECT_EQ(1u, client_->num_requests()); 2765 EXPECT_EQ(1u, client_->num_requests());
2764 // Including response to original request, 12 responses in total were 2766 // Including response to original request, 12 responses in total were
2765 // recieved. 2767 // recieved.
2766 EXPECT_EQ(12u, client_->num_responses()); 2768 EXPECT_EQ(12u, client_->num_responses());
2767 } 2769 }
2768 2770
2771 // TODO(ckrasic) - remove this when deprecating
2772 // FLAGS_quic_enable_server_push_by_default.
2769 TEST_P(EndToEndTestServerPush, DisabledWithoutConnectionOption) { 2773 TEST_P(EndToEndTestServerPush, DisabledWithoutConnectionOption) {
2774 FLAGS_quic_enable_server_push_by_default = false;
2770 // Tests that server push won't be triggered when kSPSH is not set by client. 2775 // Tests that server push won't be triggered when kSPSH is not set by client.
2771 support_server_push_ = false; 2776 support_server_push_ = false;
2772 ASSERT_TRUE(Initialize()); 2777 ASSERT_TRUE(Initialize());
2773 2778
2774 // Add a response with headers, body, and push resources. 2779 // Add a response with headers, body, and push resources.
2775 const string kBody = "body content"; 2780 const string kBody = "body content";
2776 size_t const kNumResources = 4; 2781 size_t const kNumResources = 4;
2777 string push_urls[] = { 2782 string push_urls[] = {
2778 "https://example.com/font.woff", "https://example.com/script.js", 2783 "https://example.com/font.woff", "https://example.com/script.js",
2779 "https://fonts.example.com/font.woff", 2784 "https://fonts.example.com/font.woff",
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2923 EXPECT_EQ(kBarResponseBody, client_->response_body()); 2928 EXPECT_EQ(kBarResponseBody, client_->response_body());
2924 QuicConnectionStats client_stats = 2929 QuicConnectionStats client_stats =
2925 client_->client()->session()->connection()->GetStats(); 2930 client_->client()->session()->connection()->GetStats();
2926 EXPECT_EQ(0u, client_stats.packets_lost); 2931 EXPECT_EQ(0u, client_stats.packets_lost);
2927 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); 2932 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos());
2928 } 2933 }
2929 2934
2930 } // namespace 2935 } // namespace
2931 } // namespace test 2936 } // namespace test
2932 } // namespace net 2937 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_packet_creator_peer.cc ('k') | net/tools/quic/stateless_rejector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698