| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2014 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 2014 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 2015 EXPECT_EQ(1, GetSocketPoolGroupCount( | 2015 EXPECT_EQ(1, GetSocketPoolGroupCount( |
| 2016 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 2016 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 2017 EXPECT_TRUE(waiter1.used_proxy_info().is_direct()); | 2017 EXPECT_TRUE(waiter1.used_proxy_info().is_direct()); |
| 2018 } | 2018 } |
| 2019 | 2019 |
| 2020 // TODO(ricea): Re-enable once WebSocket over SPDY is implemented. | 2020 // TODO(ricea): Re-enable once WebSocket over SPDY is implemented. |
| 2021 TEST_P(HttpStreamFactoryTest, DISABLED_OrphanedWebSocketStream) { | 2021 TEST_P(HttpStreamFactoryTest, DISABLED_OrphanedWebSocketStream) { |
| 2022 SpdySessionDependencies session_deps(GetParam(), | 2022 SpdySessionDependencies session_deps(GetParam(), |
| 2023 ProxyService::CreateDirect()); | 2023 ProxyService::CreateDirect()); |
| 2024 session_deps.enable_alternative_service_with_different_host = false; | |
| 2025 | |
| 2026 MockRead mock_read(ASYNC, OK); | 2024 MockRead mock_read(ASYNC, OK); |
| 2027 SequencedSocketData socket_data(&mock_read, 1, nullptr, 0); | 2025 SequencedSocketData socket_data(&mock_read, 1, nullptr, 0); |
| 2028 socket_data.set_connect_data(MockConnect(ASYNC, OK)); | 2026 socket_data.set_connect_data(MockConnect(ASYNC, OK)); |
| 2029 session_deps.socket_factory->AddSocketDataProvider(&socket_data); | 2027 session_deps.socket_factory->AddSocketDataProvider(&socket_data); |
| 2030 | 2028 |
| 2031 MockRead mock_read2(ASYNC, OK); | 2029 MockRead mock_read2(ASYNC, OK); |
| 2032 SequencedSocketData socket_data2(&mock_read2, 1, nullptr, 0); | 2030 SequencedSocketData socket_data2(&mock_read2, 1, nullptr, 0); |
| 2033 socket_data2.set_connect_data(MockConnect(ASYNC, ERR_IO_PENDING)); | 2031 socket_data2.set_connect_data(MockConnect(ASYNC, ERR_IO_PENDING)); |
| 2034 session_deps.socket_factory->AddSocketDataProvider(&socket_data2); | 2032 session_deps.socket_factory->AddSocketDataProvider(&socket_data2); |
| 2035 | 2033 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2079 session->GetTransportSocketPool( | 2077 session->GetTransportSocketPool( |
| 2080 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 2078 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 2081 EXPECT_EQ(1, GetSocketPoolGroupCount( | 2079 EXPECT_EQ(1, GetSocketPoolGroupCount( |
| 2082 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 2080 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 2083 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 2081 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 2084 } | 2082 } |
| 2085 | 2083 |
| 2086 } // namespace | 2084 } // namespace |
| 2087 | 2085 |
| 2088 } // namespace net | 2086 } // namespace net |
| OLD | NEW |