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

Side by Side Diff: net/quic/quic_stream_factory_test.cc

Issue 428373002: Merge 286628 "Merge 286598 "Disable SPDY and QUIC session pooling."" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985_122/src/
Patch Set: Created 6 years, 4 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/quic/quic_client_session.cc ('k') | net/socket/ssl_client_socket_pool_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 (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 "net/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "net/base/test_data_directory.h" 9 #include "net/base/test_data_directory.h"
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 &factory_, host_port_pair_, is_https_), 344 &factory_, host_port_pair_, is_https_),
345 QuicStreamFactoryPeer::GetActiveSession( 345 QuicStreamFactoryPeer::GetActiveSession(
346 &factory_, host_port_pair_, !is_https_)); 346 &factory_, host_port_pair_, !is_https_));
347 347
348 EXPECT_TRUE(socket_data1.at_read_eof()); 348 EXPECT_TRUE(socket_data1.at_read_eof());
349 EXPECT_TRUE(socket_data1.at_write_eof()); 349 EXPECT_TRUE(socket_data1.at_write_eof());
350 EXPECT_TRUE(socket_data2.at_read_eof()); 350 EXPECT_TRUE(socket_data2.at_read_eof());
351 EXPECT_TRUE(socket_data2.at_write_eof()); 351 EXPECT_TRUE(socket_data2.at_write_eof());
352 } 352 }
353 353
354 TEST_P(QuicStreamFactoryTest, Pooling) { 354 // TODO(rch): re-enable this.
355 TEST_P(QuicStreamFactoryTest, DISABLED_Pooling) {
355 MockRead reads[] = { 356 MockRead reads[] = {
356 MockRead(ASYNC, OK, 0) // EOF 357 MockRead(ASYNC, OK, 0) // EOF
357 }; 358 };
358 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0); 359 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0);
359 socket_factory_.AddSocketDataProvider(&socket_data); 360 socket_factory_.AddSocketDataProvider(&socket_data);
360 socket_data.StopAfter(1); 361 socket_data.StopAfter(1);
361 362
362 HostPortPair server2("mail.google.com", kDefaultServerPort); 363 HostPortPair server2("mail.google.com", kDefaultServerPort);
363 host_resolver_.set_synchronous_mode(true); 364 host_resolver_.set_synchronous_mode(true);
364 host_resolver_.rules()->AddIPLiteralRule( 365 host_resolver_.rules()->AddIPLiteralRule(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 461
461 EXPECT_TRUE(QuicStreamFactoryPeer::HasActiveSession( 462 EXPECT_TRUE(QuicStreamFactoryPeer::HasActiveSession(
462 &factory_, server2, is_https_)); 463 &factory_, server2, is_https_));
463 464
464 EXPECT_TRUE(socket_data1.at_read_eof()); 465 EXPECT_TRUE(socket_data1.at_read_eof());
465 EXPECT_TRUE(socket_data1.at_write_eof()); 466 EXPECT_TRUE(socket_data1.at_write_eof());
466 EXPECT_TRUE(socket_data2.at_read_eof()); 467 EXPECT_TRUE(socket_data2.at_read_eof());
467 EXPECT_TRUE(socket_data2.at_write_eof()); 468 EXPECT_TRUE(socket_data2.at_write_eof());
468 } 469 }
469 470
470 TEST_P(QuicStreamFactoryTest, HttpsPooling) { 471 // TODO(rch): re-enable this.
472 TEST_P(QuicStreamFactoryTest, DISABLED_HttpsPooling) {
471 MockRead reads[] = { 473 MockRead reads[] = {
472 MockRead(ASYNC, OK, 0) // EOF 474 MockRead(ASYNC, OK, 0) // EOF
473 }; 475 };
474 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0); 476 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0);
475 socket_factory_.AddSocketDataProvider(&socket_data); 477 socket_factory_.AddSocketDataProvider(&socket_data);
476 socket_data.StopAfter(1); 478 socket_data.StopAfter(1);
477 479
478 HostPortPair server1("www.example.org", 443); 480 HostPortPair server1("www.example.org", 443);
479 HostPortPair server2("mail.example.org", 443); 481 HostPortPair server2("mail.example.org", 443);
480 482
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 QuicCryptoClientConfig::CachedState* cached2 = 1142 QuicCryptoClientConfig::CachedState* cached2 =
1141 crypto_config->LookupOrCreate(server_id2); 1143 crypto_config->LookupOrCreate(server_id2);
1142 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); 1144 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token());
1143 EXPECT_TRUE(cached2->source_address_token().empty()); 1145 EXPECT_TRUE(cached2->source_address_token().empty());
1144 EXPECT_FALSE(cached2->proof_valid()); 1146 EXPECT_FALSE(cached2->proof_valid());
1145 } 1147 }
1146 } 1148 }
1147 1149
1148 } // namespace test 1150 } // namespace test
1149 } // namespace net 1151 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698