| 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_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "net/base/address_list.h" | 8 #include "net/base/address_list.h" |
| 9 #include "net/base/net_log.h" | 9 #include "net/base/net_log.h" |
| 10 #include "net/base/net_log_unittest.h" | 10 #include "net/base/net_log_unittest.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void AssertAsyncWriteWithReadsSucceeds(const char* data, int len, | 82 void AssertAsyncWriteWithReadsSucceeds(const char* data, int len, |
| 83 int num_reads); | 83 int num_reads); |
| 84 | 84 |
| 85 void AddAuthToCache() { | 85 void AddAuthToCache() { |
| 86 const string16 kFoo(ASCIIToUTF16("foo")); | 86 const string16 kFoo(ASCIIToUTF16("foo")); |
| 87 const string16 kBar(ASCIIToUTF16("bar")); | 87 const string16 kBar(ASCIIToUTF16("bar")); |
| 88 session_->http_auth_cache()->Add(GURL(kProxyUrl), | 88 session_->http_auth_cache()->Add(GURL(kProxyUrl), |
| 89 "MyRealm1", | 89 "MyRealm1", |
| 90 HttpAuth::AUTH_SCHEME_BASIC, | 90 HttpAuth::AUTH_SCHEME_BASIC, |
| 91 "Basic realm=MyRealm1", | 91 "Basic realm=MyRealm1", |
| 92 kFoo, | 92 AuthCredentials(kFoo, kBar), |
| 93 kBar, | |
| 94 "/"); | 93 "/"); |
| 95 } | 94 } |
| 96 | 95 |
| 97 void Run(int steps) { | 96 void Run(int steps) { |
| 98 data_->StopAfter(steps); | 97 data_->StopAfter(steps); |
| 99 data_->Run(); | 98 data_->Run(); |
| 100 } | 99 } |
| 101 | 100 |
| 102 scoped_ptr<SpdyProxyClientSocket> sock_; | 101 scoped_ptr<SpdyProxyClientSocket> sock_; |
| 103 TestOldCompletionCallback read_callback_; | 102 TestOldCompletionCallback read_callback_; |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 scoped_refptr<IOBuffer> buf(new IOBuffer(kLen1)); | 1163 scoped_refptr<IOBuffer> buf(new IOBuffer(kLen1)); |
| 1165 ASSERT_EQ(ERR_IO_PENDING, sock_->Read(buf, kLen1, &read_callback_)); | 1164 ASSERT_EQ(ERR_IO_PENDING, sock_->Read(buf, kLen1, &read_callback_)); |
| 1166 | 1165 |
| 1167 sock_->Disconnect(); | 1166 sock_->Disconnect(); |
| 1168 | 1167 |
| 1169 EXPECT_FALSE(sock_->IsConnected()); | 1168 EXPECT_FALSE(sock_->IsConnected()); |
| 1170 EXPECT_FALSE(read_callback_.have_result()); | 1169 EXPECT_FALSE(read_callback_.have_result()); |
| 1171 } | 1170 } |
| 1172 | 1171 |
| 1173 } // namespace net | 1172 } // namespace net |
| OLD | NEW |