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

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

Issue 3846005: Revert 62918 - net: clean up SSLHostInfo construction.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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_proxy_client_socket_pool_unittest.cc ('k') | net/net.gyp » ('j') | 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/http/http_response_body_drainer.h" 5 #include "net/http/http_response_body_drainer.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 is_complete_ = true; 170 is_complete_ = true;
171 callback->Run(kMagicChunkSize); 171 callback->Run(kMagicChunkSize);
172 } 172 }
173 173
174 class HttpResponseBodyDrainerTest : public testing::Test { 174 class HttpResponseBodyDrainerTest : public testing::Test {
175 protected: 175 protected:
176 HttpResponseBodyDrainerTest() 176 HttpResponseBodyDrainerTest()
177 : session_(new HttpNetworkSession( 177 : session_(new HttpNetworkSession(
178 NULL, 178 NULL,
179 NULL, 179 NULL,
180 NULL /* ssl_host_info_factory */,
181 ProxyService::CreateDirect(), 180 ProxyService::CreateDirect(),
182 NULL, 181 NULL,
183 new SSLConfigServiceDefaults, 182 new SSLConfigServiceDefaults,
184 new SpdySessionPool(NULL), 183 new SpdySessionPool(NULL),
185 NULL, 184 NULL,
186 NULL, 185 NULL,
187 NULL)), 186 NULL)),
188 mock_stream_(new MockHttpStream(&result_waiter_)), 187 mock_stream_(new MockHttpStream(&result_waiter_)),
189 drainer_(new HttpResponseBodyDrainer(mock_stream_)) {} 188 drainer_(new HttpResponseBodyDrainer(mock_stream_)) {}
190 ~HttpResponseBodyDrainerTest() {} 189 ~HttpResponseBodyDrainerTest() {}
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 too_many_chunks += 1; // Now it's too large. 234 too_many_chunks += 1; // Now it's too large.
236 235
237 mock_stream_->set_num_chunks(too_many_chunks); 236 mock_stream_->set_num_chunks(too_many_chunks);
238 drainer_->Start(session_); 237 drainer_->Start(session_);
239 EXPECT_TRUE(result_waiter_.WaitForResult()); 238 EXPECT_TRUE(result_waiter_.WaitForResult());
240 } 239 }
241 240
242 } // namespace 241 } // namespace
243 242
244 } // namespace net 243 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool_unittest.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698