| 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/spdy/spdy_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void AssertWriteReturns(const char* data, int len, int rv); | 92 void AssertWriteReturns(const char* data, int len, int rv); |
| 93 void AssertWriteLength(int len); | 93 void AssertWriteLength(int len); |
| 94 void AssertAsyncWriteWithReadsSucceeds(const char* data, int len, | 94 void AssertAsyncWriteWithReadsSucceeds(const char* data, int len, |
| 95 int num_reads); | 95 int num_reads); |
| 96 | 96 |
| 97 void AddAuthToCache() { | 97 void AddAuthToCache() { |
| 98 const string16 kFoo(ASCIIToUTF16("foo")); | 98 const string16 kFoo(ASCIIToUTF16("foo")); |
| 99 const string16 kBar(ASCIIToUTF16("bar")); | 99 const string16 kBar(ASCIIToUTF16("bar")); |
| 100 session_->http_auth_cache()->Add(GURL(kProxyUrl), | 100 session_->http_auth_cache()->Add(GURL(kProxyUrl), |
| 101 "MyRealm1", | 101 "MyRealm1", |
| 102 HttpAuth::AUTH_SCHEME_BASIC, | 102 "basic", |
| 103 "Basic realm=MyRealm1", | 103 "Basic realm=MyRealm1", |
| 104 AuthCredentials(kFoo, kBar), | 104 AuthCredentials(kFoo, kBar), |
| 105 "/"); | 105 "/"); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void Run(int steps) { | 108 void Run(int steps) { |
| 109 data_->StopAfter(steps); | 109 data_->StopAfter(steps); |
| 110 data_->Run(); | 110 data_->Run(); |
| 111 } | 111 } |
| 112 | 112 |
| (...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 write_callback_.callback())); | 1356 write_callback_.callback())); |
| 1357 | 1357 |
| 1358 Run(2); | 1358 Run(2); |
| 1359 | 1359 |
| 1360 EXPECT_FALSE(sock_.get()); | 1360 EXPECT_FALSE(sock_.get()); |
| 1361 EXPECT_TRUE(read_callback.have_result()); | 1361 EXPECT_TRUE(read_callback.have_result()); |
| 1362 EXPECT_FALSE(write_callback_.have_result()); | 1362 EXPECT_FALSE(write_callback_.have_result()); |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 } // namespace net | 1365 } // namespace net |
| OLD | NEW |