| OLD | NEW |
| 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/http/http_stream_factory_impl.h" | 5 #include "net/http/http_stream_factory_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 last_num_streams_(-1) { | 418 last_num_streams_(-1) { |
| 419 } | 419 } |
| 420 | 420 |
| 421 class HttpStreamFactoryTest : public ::testing::Test, | 421 class HttpStreamFactoryTest : public ::testing::Test, |
| 422 public ::testing::WithParamInterface<NextProto> { | 422 public ::testing::WithParamInterface<NextProto> { |
| 423 }; | 423 }; |
| 424 | 424 |
| 425 INSTANTIATE_TEST_CASE_P( | 425 INSTANTIATE_TEST_CASE_P( |
| 426 NextProto, | 426 NextProto, |
| 427 HttpStreamFactoryTest, | 427 HttpStreamFactoryTest, |
| 428 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15)); | 428 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15, kProtoSPDY4)); |
| 429 | 429 |
| 430 TEST_P(HttpStreamFactoryTest, PreconnectDirect) { | 430 TEST_P(HttpStreamFactoryTest, PreconnectDirect) { |
| 431 for (size_t i = 0; i < arraysize(kTests); ++i) { | 431 for (size_t i = 0; i < arraysize(kTests); ++i) { |
| 432 SpdySessionDependencies session_deps( | 432 SpdySessionDependencies session_deps( |
| 433 GetParam(), ProxyService::CreateDirect()); | 433 GetParam(), ProxyService::CreateDirect()); |
| 434 scoped_refptr<HttpNetworkSession> session( | 434 scoped_refptr<HttpNetworkSession> session( |
| 435 SpdySessionDependencies::SpdyCreateSession(&session_deps)); | 435 SpdySessionDependencies::SpdyCreateSession(&session_deps)); |
| 436 HttpNetworkSessionPeer peer(session); | 436 HttpNetworkSessionPeer peer(session); |
| 437 CapturePreconnectsTransportSocketPool* transport_conn_pool = | 437 CapturePreconnectsTransportSocketPool* transport_conn_pool = |
| 438 new CapturePreconnectsTransportSocketPool( | 438 new CapturePreconnectsTransportSocketPool( |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 1360 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 1361 | 1361 |
| 1362 // Make sure there is no orphaned job. it is already canceled. | 1362 // Make sure there is no orphaned job. it is already canceled. |
| 1363 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( | 1363 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( |
| 1364 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); | 1364 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 } // namespace | 1367 } // namespace |
| 1368 | 1368 |
| 1369 } // namespace net | 1369 } // namespace net |
| OLD | NEW |