| 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_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 void SSLClientSocketPoolTest::TestIPPoolingDisabled( | 742 void SSLClientSocketPoolTest::TestIPPoolingDisabled( |
| 743 SSLSocketDataProvider* ssl) { | 743 SSLSocketDataProvider* ssl) { |
| 744 const int kTestPort = 80; | 744 const int kTestPort = 80; |
| 745 struct TestHosts { | 745 struct TestHosts { |
| 746 std::string name; | 746 std::string name; |
| 747 std::string iplist; | 747 std::string iplist; |
| 748 HostPortProxyPair pair; | 748 HostPortProxyPair pair; |
| 749 AddressList addresses; | 749 AddressList addresses; |
| 750 } test_hosts[] = { | 750 } test_hosts[] = { |
| 751 { "www.webkit.org", "192.0.2.33,192.168.0.1,192.168.0.5" }, | 751 { "www.webkit.org", "192.0.2.33,192.168.0.1,192.168.0.5" }, |
| 752 { "js.webkit.org", "192.168.0.4,192.168.0.1,192.0.2.33" }, | 752 { "js.webkit.com", "192.168.0.4,192.168.0.1,192.0.2.33" }, |
| 753 }; | 753 }; |
| 754 | 754 |
| 755 TestCompletionCallback callback; | 755 TestCompletionCallback callback; |
| 756 int rv; | 756 int rv; |
| 757 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { | 757 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { |
| 758 host_resolver_.rules()->AddIPLiteralRule(test_hosts[i].name, | 758 host_resolver_.rules()->AddIPLiteralRule(test_hosts[i].name, |
| 759 test_hosts[i].iplist, ""); | 759 test_hosts[i].iplist, ""); |
| 760 | 760 |
| 761 // This test requires that the HostResolver cache be populated. Normal | 761 // This test requires that the HostResolver cache be populated. Normal |
| 762 // code would have done this already, but we do it manually. | 762 // code would have done this already, but we do it manually. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 ssl.channel_id_sent = true; | 834 ssl.channel_id_sent = true; |
| 835 ssl.SetNextProto(kProtoSPDY2); | 835 ssl.SetNextProto(kProtoSPDY2); |
| 836 TestIPPoolingDisabled(&ssl); | 836 TestIPPoolingDisabled(&ssl); |
| 837 } | 837 } |
| 838 | 838 |
| 839 // It would be nice to also test the timeouts in SSLClientSocketPool. | 839 // It would be nice to also test the timeouts in SSLClientSocketPool. |
| 840 | 840 |
| 841 } // namespace | 841 } // namespace |
| 842 | 842 |
| 843 } // namespace net | 843 } // namespace net |
| OLD | NEW |