| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 last_num_streams_(-1) { | 417 last_num_streams_(-1) { |
| 418 } | 418 } |
| 419 | 419 |
| 420 class HttpStreamFactoryTest : public ::testing::Test, | 420 class HttpStreamFactoryTest : public ::testing::Test, |
| 421 public ::testing::WithParamInterface<NextProto> { | 421 public ::testing::WithParamInterface<NextProto> { |
| 422 }; | 422 }; |
| 423 | 423 |
| 424 INSTANTIATE_TEST_CASE_P( | 424 INSTANTIATE_TEST_CASE_P( |
| 425 NextProto, | 425 NextProto, |
| 426 HttpStreamFactoryTest, | 426 HttpStreamFactoryTest, |
| 427 testing::Values(kProtoDeprecatedSPDY2, | 427 testing::Values(kProtoSPDY31, kProtoSPDY4)); |
| 428 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4)); | |
| 429 | 428 |
| 430 TEST_P(HttpStreamFactoryTest, PreconnectDirect) { | 429 TEST_P(HttpStreamFactoryTest, PreconnectDirect) { |
| 431 for (size_t i = 0; i < arraysize(kTests); ++i) { | 430 for (size_t i = 0; i < arraysize(kTests); ++i) { |
| 432 SpdySessionDependencies session_deps( | 431 SpdySessionDependencies session_deps( |
| 433 GetParam(), ProxyService::CreateDirect()); | 432 GetParam(), ProxyService::CreateDirect()); |
| 434 scoped_refptr<HttpNetworkSession> session( | 433 scoped_refptr<HttpNetworkSession> session( |
| 435 SpdySessionDependencies::SpdyCreateSession(&session_deps)); | 434 SpdySessionDependencies::SpdyCreateSession(&session_deps)); |
| 436 HttpNetworkSessionPeer peer(session); | 435 HttpNetworkSessionPeer peer(session); |
| 437 CapturePreconnectsTransportSocketPool* transport_conn_pool = | 436 CapturePreconnectsTransportSocketPool* transport_conn_pool = |
| 438 new CapturePreconnectsTransportSocketPool( | 437 new CapturePreconnectsTransportSocketPool( |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 1298 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 1300 | 1299 |
| 1301 // Make sure there is no orphaned job. it is already canceled. | 1300 // Make sure there is no orphaned job. it is already canceled. |
| 1302 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( | 1301 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( |
| 1303 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); | 1302 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); |
| 1304 } | 1303 } |
| 1305 | 1304 |
| 1306 } // namespace | 1305 } // namespace |
| 1307 | 1306 |
| 1308 } // namespace net | 1307 } // namespace net |
| OLD | NEW |