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

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

Issue 2350173005: QUIC enable server push by default. Guarded by FLAGS_quic_enable_server_push_by_default. (Closed)
Patch Set: 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/core/quic_spdy_session.cc ('k') | no next file » | 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 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 } 2759 }
2760 2760
2761 // Because of server push, client gets all pushed resources without actually 2761 // Because of server push, client gets all pushed resources without actually
2762 // sending requests for them. 2762 // sending requests for them.
2763 EXPECT_EQ(1u, client_->num_requests()); 2763 EXPECT_EQ(1u, client_->num_requests());
2764 // Including response to original request, 12 responses in total were 2764 // Including response to original request, 12 responses in total were
2765 // recieved. 2765 // recieved.
2766 EXPECT_EQ(12u, client_->num_responses()); 2766 EXPECT_EQ(12u, client_->num_responses());
2767 } 2767 }
2768 2768
2769 // TODO(ckrasic) - remove this when deprecating
2770 // FLAGS_quic_enable_server_push_by_default.
2769 TEST_P(EndToEndTestServerPush, DisabledWithoutConnectionOption) { 2771 TEST_P(EndToEndTestServerPush, DisabledWithoutConnectionOption) {
2772 FLAGS_quic_enable_server_push_by_default = false;
2770 // Tests that server push won't be triggered when kSPSH is not set by client. 2773 // Tests that server push won't be triggered when kSPSH is not set by client.
2771 support_server_push_ = false; 2774 support_server_push_ = false;
2772 ASSERT_TRUE(Initialize()); 2775 ASSERT_TRUE(Initialize());
2773 2776
2774 // Add a response with headers, body, and push resources. 2777 // Add a response with headers, body, and push resources.
2775 const string kBody = "body content"; 2778 const string kBody = "body content";
2776 size_t const kNumResources = 4; 2779 size_t const kNumResources = 4;
2777 string push_urls[] = { 2780 string push_urls[] = {
2778 "https://example.com/font.woff", "https://example.com/script.js", 2781 "https://example.com/font.woff", "https://example.com/script.js",
2779 "https://fonts.example.com/font.woff", 2782 "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()); 2926 EXPECT_EQ(kBarResponseBody, client_->response_body());
2924 QuicConnectionStats client_stats = 2927 QuicConnectionStats client_stats =
2925 client_->client()->session()->connection()->GetStats(); 2928 client_->client()->session()->connection()->GetStats();
2926 EXPECT_EQ(0u, client_stats.packets_lost); 2929 EXPECT_EQ(0u, client_stats.packets_lost);
2927 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); 2930 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos());
2928 } 2931 }
2929 2932
2930 } // namespace 2933 } // namespace
2931 } // namespace test 2934 } // namespace test
2932 } // namespace net 2935 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698