Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: net/socket/socket_test_util.cc

Issue 3028021: Alternate-Protocol was failing when going through Digest authenticating proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Make unit test happy after merge. Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 pending_buf_len_(0), 180 pending_buf_len_(0),
181 pending_callback_(NULL) { 181 pending_callback_(NULL) {
182 DCHECK(data_); 182 DCHECK(data_);
183 data_->Reset(); 183 data_->Reset();
184 } 184 }
185 185
186 int MockTCPClientSocket::Connect(net::CompletionCallback* callback) { 186 int MockTCPClientSocket::Connect(net::CompletionCallback* callback) {
187 if (connected_) 187 if (connected_)
188 return net::OK; 188 return net::OK;
189 connected_ = true; 189 connected_ = true;
190 peer_closed_connection_ = false;
190 if (data_->connect_data().async) { 191 if (data_->connect_data().async) {
191 RunCallbackAsync(callback, data_->connect_data().result); 192 RunCallbackAsync(callback, data_->connect_data().result);
192 return net::ERR_IO_PENDING; 193 return net::ERR_IO_PENDING;
193 } 194 }
194 return data_->connect_data().result; 195 return data_->connect_data().result;
195 } 196 }
196 197
197 void MockTCPClientSocket::Disconnect() { 198 void MockTCPClientSocket::Disconnect() {
198 MockClientSocket::Disconnect(); 199 MockClientSocket::Disconnect();
199 pending_callback_ = NULL; 200 pending_callback_ = NULL;
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 895
895 const char kSOCKS5OkRequest[] = 896 const char kSOCKS5OkRequest[] =
896 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 897 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
897 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 898 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
898 899
899 const char kSOCKS5OkResponse[] = 900 const char kSOCKS5OkResponse[] =
900 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 901 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
901 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 902 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
902 903
903 } // namespace net 904 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698