OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
6 | 6 |
7 #include "net/base/ip_endpoint.h" | 7 #include "net/base/ip_endpoint.h" |
8 #include "net/spdy/spdy_io_buffer.h" | 8 #include "net/spdy/spdy_io_buffer.h" |
9 #include "net/spdy/spdy_session_pool.h" | 9 #include "net/spdy/spdy_session_pool.h" |
10 #include "net/spdy/spdy_stream.h" | 10 #include "net/spdy/spdy_stream.h" |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 SpdySessionDependencies session_deps; | 764 SpdySessionDependencies session_deps; |
765 session_deps.host_resolver->set_synchronous_mode(true); | 765 session_deps.host_resolver->set_synchronous_mode(true); |
766 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { | 766 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { |
767 session_deps.host_resolver->rules()->AddIPLiteralRule(test_hosts[i].name, | 767 session_deps.host_resolver->rules()->AddIPLiteralRule(test_hosts[i].name, |
768 test_hosts[i].iplist, ""); | 768 test_hosts[i].iplist, ""); |
769 | 769 |
770 // This test requires that the HostResolver cache be populated. Normal | 770 // This test requires that the HostResolver cache be populated. Normal |
771 // code would have done this already, but we do it manually. | 771 // code would have done this already, but we do it manually. |
772 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort)); | 772 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort)); |
773 session_deps.host_resolver->Resolve( | 773 session_deps.host_resolver->Resolve( |
774 info, &test_hosts[i].addresses, NULL, NULL, BoundNetLog()); | 774 info, &test_hosts[i].addresses, CompletionCallback(), NULL, |
| 775 BoundNetLog()); |
775 | 776 |
776 // Setup a HostPortProxyPair | 777 // Setup a HostPortProxyPair |
777 test_hosts[i].pair = HostPortProxyPair( | 778 test_hosts[i].pair = HostPortProxyPair( |
778 HostPortPair(test_hosts[i].name, kTestPort), ProxyServer::Direct()); | 779 HostPortPair(test_hosts[i].name, kTestPort), ProxyServer::Direct()); |
779 } | 780 } |
780 | 781 |
781 MockConnect connect_data(false, OK); | 782 MockConnect connect_data(false, OK); |
782 MockRead reads[] = { | 783 MockRead reads[] = { |
783 MockRead(false, ERR_IO_PENDING) // Stall forever. | 784 MockRead(false, ERR_IO_PENDING) // Stall forever. |
784 }; | 785 }; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 test_http_server_properties->SetSpdySettings(test_host_port_pair, | 911 test_http_server_properties->SetSpdySettings(test_host_port_pair, |
911 test_settings); | 912 test_settings); |
912 EXPECT_NE(0u, test_http_server_properties->GetSpdySettings( | 913 EXPECT_NE(0u, test_http_server_properties->GetSpdySettings( |
913 test_host_port_pair).size()); | 914 test_host_port_pair).size()); |
914 spdy_session_pool->OnIPAddressChanged(); | 915 spdy_session_pool->OnIPAddressChanged(); |
915 EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings( | 916 EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings( |
916 test_host_port_pair).size()); | 917 test_host_port_pair).size()); |
917 } | 918 } |
918 | 919 |
919 } // namespace net | 920 } // namespace net |
OLD | NEW |