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

Side by Side Diff: net/http/http_network_transaction_unittest.cc

Issue 25977005: [SPDY] Do not advertise SPDY/2 by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/http_pipelined_host_forced_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 // Original socket limits. Some tests set these. Safest to always restore 380 // Original socket limits. Some tests set these. Safest to always restore
381 // them once each test has been run. 381 // them once each test has been run.
382 int old_max_group_sockets_; 382 int old_max_group_sockets_;
383 int old_max_pool_sockets_; 383 int old_max_pool_sockets_;
384 }; 384 };
385 385
386 INSTANTIATE_TEST_CASE_P( 386 INSTANTIATE_TEST_CASE_P(
387 NextProto, 387 NextProto,
388 HttpNetworkTransactionTest, 388 HttpNetworkTransactionTest,
389 testing::Values(kProtoSPDY2, kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, 389 testing::Values(kProtoDeprecatedSPDY2,
390 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2,
390 kProtoHTTP2Draft04)); 391 kProtoHTTP2Draft04));
391 392
392 namespace { 393 namespace {
393 394
394 // Fill |str| with a long header list that consumes >= |size| bytes. 395 // Fill |str| with a long header list that consumes >= |size| bytes.
395 void FillLargeHeadersString(std::string* str, int size) { 396 void FillLargeHeadersString(std::string* str, int size) {
396 const char* row = 397 const char* row =
397 "SomeHeaderName: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n"; 398 "SomeHeaderName: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n";
398 const int sizeof_row = strlen(row); 399 const int sizeof_row = strlen(row);
399 const int num_rows = static_cast<int>( 400 const int num_rows = static_cast<int>(
(...skipping 11822 matching lines...) Expand 10 before | Expand all | Expand 10 after
12222 // established, to let the HTTP request start. 12223 // established, to let the HTTP request start.
12223 ASSERT_EQ(OK, http_callback.WaitForResult()); 12224 ASSERT_EQ(OK, http_callback.WaitForResult());
12224 std::string response_data; 12225 std::string response_data;
12225 ASSERT_EQ(OK, ReadTransaction(http_trans.get(), &response_data)); 12226 ASSERT_EQ(OK, ReadTransaction(http_trans.get(), &response_data));
12226 EXPECT_EQ("falafel", response_data); 12227 EXPECT_EQ("falafel", response_data);
12227 12228
12228 EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session)); 12229 EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session));
12229 } 12230 }
12230 12231
12231 } // namespace net 12232 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/http_pipelined_host_forced_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698