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

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

Issue 483963002: Revert 290384 "Revert 289433 "Refactor pooling logic into a help..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 &factory_, host_port_pair_, is_https_), 353 &factory_, host_port_pair_, is_https_),
354 QuicStreamFactoryPeer::GetActiveSession( 354 QuicStreamFactoryPeer::GetActiveSession(
355 &factory_, host_port_pair_, !is_https_)); 355 &factory_, host_port_pair_, !is_https_));
356 356
357 EXPECT_TRUE(socket_data1.at_read_eof()); 357 EXPECT_TRUE(socket_data1.at_read_eof());
358 EXPECT_TRUE(socket_data1.at_write_eof()); 358 EXPECT_TRUE(socket_data1.at_write_eof());
359 EXPECT_TRUE(socket_data2.at_read_eof()); 359 EXPECT_TRUE(socket_data2.at_read_eof());
360 EXPECT_TRUE(socket_data2.at_write_eof()); 360 EXPECT_TRUE(socket_data2.at_write_eof());
361 } 361 }
362 362
363 // TODO(rch): re-enable this. 363 TEST_P(QuicStreamFactoryTest, Pooling) {
364 TEST_P(QuicStreamFactoryTest, DISABLED_Pooling) {
365 MockRead reads[] = { 364 MockRead reads[] = {
366 MockRead(ASYNC, OK, 0) // EOF 365 MockRead(ASYNC, OK, 0) // EOF
367 }; 366 };
368 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0); 367 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0);
369 socket_factory_.AddSocketDataProvider(&socket_data); 368 socket_factory_.AddSocketDataProvider(&socket_data);
370 socket_data.StopAfter(1); 369 socket_data.StopAfter(1);
371 370
372 HostPortPair server2("mail.google.com", kDefaultServerPort); 371 HostPortPair server2("mail.google.com", kDefaultServerPort);
373 host_resolver_.set_synchronous_mode(true); 372 host_resolver_.set_synchronous_mode(true);
374 host_resolver_.rules()->AddIPLiteralRule( 373 host_resolver_.rules()->AddIPLiteralRule(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 469
471 EXPECT_TRUE(QuicStreamFactoryPeer::HasActiveSession( 470 EXPECT_TRUE(QuicStreamFactoryPeer::HasActiveSession(
472 &factory_, server2, is_https_)); 471 &factory_, server2, is_https_));
473 472
474 EXPECT_TRUE(socket_data1.at_read_eof()); 473 EXPECT_TRUE(socket_data1.at_read_eof());
475 EXPECT_TRUE(socket_data1.at_write_eof()); 474 EXPECT_TRUE(socket_data1.at_write_eof());
476 EXPECT_TRUE(socket_data2.at_read_eof()); 475 EXPECT_TRUE(socket_data2.at_read_eof());
477 EXPECT_TRUE(socket_data2.at_write_eof()); 476 EXPECT_TRUE(socket_data2.at_write_eof());
478 } 477 }
479 478
480 // TODO(rch): re-enable this. 479 TEST_P(QuicStreamFactoryTest, HttpsPooling) {
481 TEST_P(QuicStreamFactoryTest, DISABLED_HttpsPooling) {
482 MockRead reads[] = { 480 MockRead reads[] = {
483 MockRead(ASYNC, OK, 0) // EOF 481 MockRead(ASYNC, OK, 0) // EOF
484 }; 482 };
485 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0); 483 DeterministicSocketData socket_data(reads, arraysize(reads), NULL, 0);
486 socket_factory_.AddSocketDataProvider(&socket_data); 484 socket_factory_.AddSocketDataProvider(&socket_data);
487 socket_data.StopAfter(1); 485 socket_data.StopAfter(1);
488 486
489 HostPortPair server1("www.example.org", 443); 487 HostPortPair server1("www.example.org", 443);
490 HostPortPair server2("mail.example.org", 443); 488 HostPortPair server2("mail.example.org", 443);
491 489
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 QuicCryptoClientConfig::CachedState* cached2 = 1290 QuicCryptoClientConfig::CachedState* cached2 =
1293 crypto_config->LookupOrCreate(server_id2); 1291 crypto_config->LookupOrCreate(server_id2);
1294 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); 1292 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token());
1295 EXPECT_TRUE(cached2->source_address_token().empty()); 1293 EXPECT_TRUE(cached2->source_address_token().empty());
1296 EXPECT_FALSE(cached2->proof_valid()); 1294 EXPECT_FALSE(cached2->proof_valid());
1297 } 1295 }
1298 } 1296 }
1299 1297
1300 } // namespace test 1298 } // namespace test
1301 } // namespace net 1299 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/quic/quic_stream_factory.cc ('k') | trunk/src/net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698