| 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 SpdySessionDependencies session_deps; | 770 SpdySessionDependencies session_deps; |
| 771 session_deps.host_resolver->set_synchronous_mode(true); | 771 session_deps.host_resolver->set_synchronous_mode(true); |
| 772 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { | 772 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { |
| 773 session_deps.host_resolver->rules()->AddIPLiteralRule(test_hosts[i].name, | 773 session_deps.host_resolver->rules()->AddIPLiteralRule(test_hosts[i].name, |
| 774 test_hosts[i].iplist, ""); | 774 test_hosts[i].iplist, ""); |
| 775 | 775 |
| 776 // This test requires that the HostResolver cache be populated. Normal | 776 // This test requires that the HostResolver cache be populated. Normal |
| 777 // code would have done this already, but we do it manually. | 777 // code would have done this already, but we do it manually. |
| 778 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort)); | 778 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort)); |
| 779 session_deps.host_resolver->Resolve( | 779 session_deps.host_resolver->Resolve( |
| 780 info, &test_hosts[i].addresses, NULL, NULL, BoundNetLog()); | 780 info, &test_hosts[i].addresses, CompletionCallback(), NULL, |
| 781 BoundNetLog()); |
| 781 | 782 |
| 782 // Setup a HostPortProxyPair | 783 // Setup a HostPortProxyPair |
| 783 test_hosts[i].pair = HostPortProxyPair( | 784 test_hosts[i].pair = HostPortProxyPair( |
| 784 HostPortPair(test_hosts[i].name, kTestPort), ProxyServer::Direct()); | 785 HostPortPair(test_hosts[i].name, kTestPort), ProxyServer::Direct()); |
| 785 } | 786 } |
| 786 | 787 |
| 787 MockConnect connect_data(false, OK); | 788 MockConnect connect_data(false, OK); |
| 788 MockRead reads[] = { | 789 MockRead reads[] = { |
| 789 MockRead(false, ERR_IO_PENDING) // Stall forever. | 790 MockRead(false, ERR_IO_PENDING) // Stall forever. |
| 790 }; | 791 }; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 spdy::SpdySettings test_settings; | 915 spdy::SpdySettings test_settings; |
| 915 test_settings.push_back(spdy::SpdySetting(id, max_concurrent_streams)); | 916 test_settings.push_back(spdy::SpdySetting(id, max_concurrent_streams)); |
| 916 | 917 |
| 917 test_settings_storage->Set(test_host_port_pair, test_settings); | 918 test_settings_storage->Set(test_host_port_pair, test_settings); |
| 918 EXPECT_NE(0u, test_settings_storage->Get(test_host_port_pair).size()); | 919 EXPECT_NE(0u, test_settings_storage->Get(test_host_port_pair).size()); |
| 919 spdy_session_pool->OnIPAddressChanged(); | 920 spdy_session_pool->OnIPAddressChanged(); |
| 920 EXPECT_EQ(0u, test_settings_storage->Get(test_host_port_pair).size()); | 921 EXPECT_EQ(0u, test_settings_storage->Get(test_host_port_pair).size()); |
| 921 } | 922 } |
| 922 | 923 |
| 923 } // namespace net | 924 } // namespace net |
| OLD | NEW |