| 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 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1945 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 1945 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 1946 EXPECT_EQ(1, GetSocketPoolGroupCount( | 1946 EXPECT_EQ(1, GetSocketPoolGroupCount( |
| 1947 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 1947 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 1948 EXPECT_TRUE(waiter1.used_proxy_info().is_direct()); | 1948 EXPECT_TRUE(waiter1.used_proxy_info().is_direct()); |
| 1949 } | 1949 } |
| 1950 | 1950 |
| 1951 // TODO(ricea): Re-enable once WebSocket over SPDY is implemented. | 1951 // TODO(ricea): Re-enable once WebSocket over SPDY is implemented. |
| 1952 TEST_P(HttpStreamFactoryTest, DISABLED_OrphanedWebSocketStream) { | 1952 TEST_P(HttpStreamFactoryTest, DISABLED_OrphanedWebSocketStream) { |
| 1953 SpdySessionDependencies session_deps(GetParam(), | 1953 SpdySessionDependencies session_deps(GetParam(), |
| 1954 ProxyService::CreateDirect()); | 1954 ProxyService::CreateDirect()); |
| 1955 session_deps.parse_alternative_services = true; | |
| 1956 session_deps.enable_alternative_service_with_different_host = false; | 1955 session_deps.enable_alternative_service_with_different_host = false; |
| 1957 | 1956 |
| 1958 MockRead mock_read(ASYNC, OK); | 1957 MockRead mock_read(ASYNC, OK); |
| 1959 SequencedSocketData socket_data(&mock_read, 1, nullptr, 0); | 1958 SequencedSocketData socket_data(&mock_read, 1, nullptr, 0); |
| 1960 socket_data.set_connect_data(MockConnect(ASYNC, OK)); | 1959 socket_data.set_connect_data(MockConnect(ASYNC, OK)); |
| 1961 session_deps.socket_factory->AddSocketDataProvider(&socket_data); | 1960 session_deps.socket_factory->AddSocketDataProvider(&socket_data); |
| 1962 | 1961 |
| 1963 MockRead mock_read2(ASYNC, OK); | 1962 MockRead mock_read2(ASYNC, OK); |
| 1964 SequencedSocketData socket_data2(&mock_read2, 1, nullptr, 0); | 1963 SequencedSocketData socket_data2(&mock_read2, 1, nullptr, 0); |
| 1965 socket_data2.set_connect_data(MockConnect(ASYNC, ERR_IO_PENDING)); | 1964 socket_data2.set_connect_data(MockConnect(ASYNC, ERR_IO_PENDING)); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 2014 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 2016 | 2015 |
| 2017 // Make sure there is no orphaned job. it is already canceled. | 2016 // Make sure there is no orphaned job. it is already canceled. |
| 2018 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( | 2017 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( |
| 2019 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); | 2018 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); |
| 2020 } | 2019 } |
| 2021 | 2020 |
| 2022 } // namespace | 2021 } // namespace |
| 2023 | 2022 |
| 2024 } // namespace net | 2023 } // namespace net |
| OLD | NEW |