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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 NULL), | 385 NULL), |
386 last_num_streams_(-1) {} | 386 last_num_streams_(-1) {} |
387 | 387 |
388 class HttpStreamFactoryTest : public ::testing::Test, | 388 class HttpStreamFactoryTest : public ::testing::Test, |
389 public ::testing::WithParamInterface<NextProto> { | 389 public ::testing::WithParamInterface<NextProto> { |
390 }; | 390 }; |
391 | 391 |
392 INSTANTIATE_TEST_CASE_P( | 392 INSTANTIATE_TEST_CASE_P( |
393 NextProto, | 393 NextProto, |
394 HttpStreamFactoryTest, | 394 HttpStreamFactoryTest, |
395 testing::Values(kProtoSPDY2, kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, | 395 testing::Values(kProtoDeprecatedSPDY2, |
| 396 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, |
396 kProtoHTTP2Draft04)); | 397 kProtoHTTP2Draft04)); |
397 | 398 |
398 TEST_P(HttpStreamFactoryTest, PreconnectDirect) { | 399 TEST_P(HttpStreamFactoryTest, PreconnectDirect) { |
399 for (size_t i = 0; i < arraysize(kTests); ++i) { | 400 for (size_t i = 0; i < arraysize(kTests); ++i) { |
400 SpdySessionDependencies session_deps( | 401 SpdySessionDependencies session_deps( |
401 GetParam(), ProxyService::CreateDirect()); | 402 GetParam(), ProxyService::CreateDirect()); |
402 scoped_refptr<HttpNetworkSession> session( | 403 scoped_refptr<HttpNetworkSession> session( |
403 SpdySessionDependencies::SpdyCreateSession(&session_deps)); | 404 SpdySessionDependencies::SpdyCreateSession(&session_deps)); |
404 HttpNetworkSessionPeer peer(session); | 405 HttpNetworkSessionPeer peer(session); |
405 CapturePreconnectsTransportSocketPool* transport_conn_pool = | 406 CapturePreconnectsTransportSocketPool* transport_conn_pool = |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1217 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 1218 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
1218 | 1219 |
1219 // Make sure there is no orphaned job. it is already canceled. | 1220 // Make sure there is no orphaned job. it is already canceled. |
1220 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( | 1221 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( |
1221 session->websocket_stream_factory())->num_orphaned_jobs()); | 1222 session->websocket_stream_factory())->num_orphaned_jobs()); |
1222 } | 1223 } |
1223 | 1224 |
1224 } // namespace | 1225 } // namespace |
1225 | 1226 |
1226 } // namespace net | 1227 } // namespace net |
OLD | NEW |