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/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 &http_proxy_histograms_, | 93 &http_proxy_histograms_, |
94 NULL, | 94 NULL, |
95 &transport_socket_pool_, | 95 &transport_socket_pool_, |
96 &ssl_socket_pool_, | 96 &ssl_socket_pool_, |
97 NULL) {} | 97 NULL) {} |
98 | 98 |
99 virtual ~HttpProxyClientSocketPoolTest() { | 99 virtual ~HttpProxyClientSocketPoolTest() { |
100 } | 100 } |
101 | 101 |
102 void AddAuthToCache() { | 102 void AddAuthToCache() { |
103 const base::string16 kFoo(ASCIIToUTF16("foo")); | 103 const base::string16 kFoo(base::ASCIIToUTF16("foo")); |
104 const base::string16 kBar(ASCIIToUTF16("bar")); | 104 const base::string16 kBar(base::ASCIIToUTF16("bar")); |
105 GURL proxy_url(GetParam().proxy_type == HTTP ? | 105 GURL proxy_url(GetParam().proxy_type == HTTP ? |
106 (std::string("http://") + kHttpProxyHost) : | 106 (std::string("http://") + kHttpProxyHost) : |
107 (std::string("https://") + kHttpsProxyHost)); | 107 (std::string("https://") + kHttpsProxyHost)); |
108 session_->http_auth_cache()->Add(proxy_url, | 108 session_->http_auth_cache()->Add(proxy_url, |
109 "MyRealm1", | 109 "MyRealm1", |
110 HttpAuth::AUTH_SCHEME_BASIC, | 110 HttpAuth::AUTH_SCHEME_BASIC, |
111 "Basic realm=MyRealm1", | 111 "Basic realm=MyRealm1", |
112 AuthCredentials(kFoo, kBar), | 112 AuthCredentials(kFoo, kBar), |
113 "/"); | 113 "/"); |
114 } | 114 } |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 EXPECT_TRUE(headers->IsRedirect(&location)); | 725 EXPECT_TRUE(headers->IsRedirect(&location)); |
726 EXPECT_EQ(location, redirectTarget); | 726 EXPECT_EQ(location, redirectTarget); |
727 } | 727 } |
728 } | 728 } |
729 | 729 |
730 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 730 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
731 | 731 |
732 } // namespace | 732 } // namespace |
733 | 733 |
734 } // namespace net | 734 } // namespace net |
OLD | NEW |