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

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

Issue 1651153005: changes QUIC negotiation about max open streams which effects server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113042237
Patch Set: Created 4 years, 10 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_session_peer.cc ('k') | net/tools/quic/quic_client_session.cc » ('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 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 } 1161 }
1162 1162
1163 TEST_P(EndToEndTest, NegotiateMaxOpenStreams) { 1163 TEST_P(EndToEndTest, NegotiateMaxOpenStreams) {
1164 // Negotiate 1 max open stream. 1164 // Negotiate 1 max open stream.
1165 client_config_.SetMaxStreamsPerConnection(1, 1); 1165 client_config_.SetMaxStreamsPerConnection(1, 1);
1166 ASSERT_TRUE(Initialize()); 1166 ASSERT_TRUE(Initialize());
1167 client_->client()->WaitForCryptoHandshakeConfirmed(); 1167 client_->client()->WaitForCryptoHandshakeConfirmed();
1168 1168
1169 // Make the client misbehave after negotiation. 1169 // Make the client misbehave after negotiation.
1170 const int kServerMaxStreams = kMaxStreamsMinimumIncrement + 1; 1170 const int kServerMaxStreams = kMaxStreamsMinimumIncrement + 1;
1171 QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(), 1171 QuicSessionPeer::SetMaxOpenOutgoingStreams(client_->client()->session(),
1172 kServerMaxStreams + 1); 1172 kServerMaxStreams + 1);
1173 1173
1174 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); 1174 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo");
1175 request.AddHeader("content-length", "3"); 1175 request.AddHeader("content-length", "3");
1176 request.set_has_complete_message(false); 1176 request.set_has_complete_message(false);
1177 1177
1178 // The server supports a small number of additional streams beyond the 1178 // The server supports a small number of additional streams beyond the
1179 // negotiated limit. Open enough streams to go beyond that limit. 1179 // negotiated limit. Open enough streams to go beyond that limit.
1180 for (int i = 0; i < kServerMaxStreams + 1; ++i) { 1180 for (int i = 0; i < kServerMaxStreams + 1; ++i) {
1181 client_->SendMessage(request); 1181 client_->SendMessage(request);
1182 } 1182 }
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 "www.google.com", "/trailer_url", headers, kBody, trailers); 2170 "www.google.com", "/trailer_url", headers, kBody, trailers);
2171 2171
2172 EXPECT_EQ(kBody, client_->SendSynchronousRequest("/trailer_url")); 2172 EXPECT_EQ(kBody, client_->SendSynchronousRequest("/trailer_url"));
2173 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 2173 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
2174 EXPECT_EQ(trailers, client_->response_trailers()); 2174 EXPECT_EQ(trailers, client_->response_trailers());
2175 } 2175 }
2176 2176
2177 } // namespace 2177 } // namespace
2178 } // namespace test 2178 } // namespace test
2179 } // namespace net 2179 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_session_peer.cc ('k') | net/tools/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698