| 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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 1343 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 1344 EXPECT_EQ(1, GetSocketPoolGroupCount( | 1344 EXPECT_EQ(1, GetSocketPoolGroupCount( |
| 1345 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 1345 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 1346 EXPECT_TRUE(waiter1.used_proxy_info().is_direct()); | 1346 EXPECT_TRUE(waiter1.used_proxy_info().is_direct()); |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 // TODO(ricea): Re-enable once WebSocket over SPDY is implemented. | 1349 // TODO(ricea): Re-enable once WebSocket over SPDY is implemented. |
| 1350 TEST_P(HttpStreamFactoryTest, DISABLED_OrphanedWebSocketStream) { | 1350 TEST_P(HttpStreamFactoryTest, DISABLED_OrphanedWebSocketStream) { |
| 1351 SpdySessionDependencies session_deps(GetParam(), | 1351 SpdySessionDependencies session_deps(GetParam(), |
| 1352 ProxyService::CreateDirect()); | 1352 ProxyService::CreateDirect()); |
| 1353 session_deps.use_alternate_protocols = true; | 1353 session_deps.use_alternative_services = true; |
| 1354 | 1354 |
| 1355 MockRead mock_read(ASYNC, OK); | 1355 MockRead mock_read(ASYNC, OK); |
| 1356 SequencedSocketData socket_data(&mock_read, 1, nullptr, 0); | 1356 SequencedSocketData socket_data(&mock_read, 1, nullptr, 0); |
| 1357 socket_data.set_connect_data(MockConnect(ASYNC, OK)); | 1357 socket_data.set_connect_data(MockConnect(ASYNC, OK)); |
| 1358 session_deps.socket_factory->AddSocketDataProvider(&socket_data); | 1358 session_deps.socket_factory->AddSocketDataProvider(&socket_data); |
| 1359 | 1359 |
| 1360 MockRead mock_read2(ASYNC, OK); | 1360 MockRead mock_read2(ASYNC, OK); |
| 1361 SequencedSocketData socket_data2(&mock_read2, 1, nullptr, 0); | 1361 SequencedSocketData socket_data2(&mock_read2, 1, nullptr, 0); |
| 1362 socket_data2.set_connect_data(MockConnect(ASYNC, ERR_IO_PENDING)); | 1362 socket_data2.set_connect_data(MockConnect(ASYNC, ERR_IO_PENDING)); |
| 1363 session_deps.socket_factory->AddSocketDataProvider(&socket_data2); | 1363 session_deps.socket_factory->AddSocketDataProvider(&socket_data2); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 1413 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 1414 | 1414 |
| 1415 // Make sure there is no orphaned job. it is already canceled. | 1415 // Make sure there is no orphaned job. it is already canceled. |
| 1416 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( | 1416 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( |
| 1417 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); | 1417 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 } // namespace | 1420 } // namespace |
| 1421 | 1421 |
| 1422 } // namespace net | 1422 } // namespace net |
| OLD | NEW |