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

Side by Side Diff: net/http/http_pipelined_connection_impl_unittest.cc

Issue 8898036: base::Bind: Convert proxy_resolving_client_socket.[cc,h] and deps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Possible test fix. Created 9 years 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
OLDNEW
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/http/http_pipelined_connection_impl.h" 5 #include "net/http/http_pipelined_connection_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 MockWrite* writes, size_t writes_count) { 79 MockWrite* writes, size_t writes_count) {
80 data_ = new DeterministicSocketData(reads, reads_count, 80 data_ = new DeterministicSocketData(reads, reads_count,
81 writes, writes_count); 81 writes, writes_count);
82 data_->set_connect_data(MockConnect(false, 0)); 82 data_->set_connect_data(MockConnect(false, 0));
83 if (reads_count || writes_count) { 83 if (reads_count || writes_count) {
84 data_->StopAfter(reads_count + writes_count); 84 data_->StopAfter(reads_count + writes_count);
85 } 85 }
86 factory_.AddSocketDataProvider(data_.get()); 86 factory_.AddSocketDataProvider(data_.get());
87 scoped_refptr<DummySocketParams> params; 87 scoped_refptr<DummySocketParams> params;
88 ClientSocketHandle* connection = new ClientSocketHandle; 88 ClientSocketHandle* connection = new ClientSocketHandle;
89 connection->Init("a", params, MEDIUM, NULL, &pool_, BoundNetLog()); 89 connection->Init("a", params, MEDIUM, CompletionCallback(), &pool_,
90 BoundNetLog());
90 pipeline_.reset(new HttpPipelinedConnectionImpl(connection, &delegate_, 91 pipeline_.reset(new HttpPipelinedConnectionImpl(connection, &delegate_,
91 ssl_config_, proxy_info_, 92 ssl_config_, proxy_info_,
92 BoundNetLog(), false)); 93 BoundNetLog(), false));
93 } 94 }
94 95
95 HttpRequestInfo* GetRequestInfo(const std::string& filename) { 96 HttpRequestInfo* GetRequestInfo(const std::string& filename) {
96 HttpRequestInfo* request_info = new HttpRequestInfo; 97 HttpRequestInfo* request_info = new HttpRequestInfo;
97 request_info->url = GURL("http://localhost/" + filename); 98 request_info->url = GURL("http://localhost/" + filename);
98 request_info->method = "GET"; 99 request_info->method = "GET";
99 request_info_vector_.push_back(request_info); 100 request_info_vector_.push_back(request_info);
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 MessageLoop::current()->RunAllPending(); 1383 MessageLoop::current()->RunAllPending();
1383 1384
1384 stream->Close(false); 1385 stream->Close(false);
1385 EXPECT_CALL(delegate_, OnPipelineHasCapacity(pipeline_.get())).Times(1); 1386 EXPECT_CALL(delegate_, OnPipelineHasCapacity(pipeline_.get())).Times(1);
1386 stream.reset(NULL); 1387 stream.reset(NULL);
1387 } 1388 }
1388 1389
1389 } // anonymous namespace 1390 } // anonymous namespace
1390 1391
1391 } // namespace net 1392 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_proxy_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698