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

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

Issue 5386001: Cache certificate verification results in memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Upload before checkin Created 10 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) 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 /* host_resolver */, 178 NULL /* host_resolver */,
179 NULL /* dnsrr_resolver */, 179 NULL /* dnsrr_resolver */,
180 NULL /* dns_cert_checker */, 180 NULL /* dns_cert_checker */,
181 NULL,
181 NULL /* ssl_host_info_factory */, 182 NULL /* ssl_host_info_factory */,
182 ProxyService::CreateDirect(), 183 ProxyService::CreateDirect(),
183 NULL, 184 NULL,
184 new SSLConfigServiceDefaults, 185 new SSLConfigServiceDefaults,
185 new SpdySessionPool(NULL), 186 new SpdySessionPool(NULL),
186 NULL, 187 NULL,
187 NULL, 188 NULL,
188 NULL)), 189 NULL)),
189 mock_stream_(new MockHttpStream(&result_waiter_)), 190 mock_stream_(new MockHttpStream(&result_waiter_)),
190 drainer_(new HttpResponseBodyDrainer(mock_stream_)) {} 191 drainer_(new HttpResponseBodyDrainer(mock_stream_)) {}
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 too_many_chunks += 1; // Now it's too large. 237 too_many_chunks += 1; // Now it's too large.
237 238
238 mock_stream_->set_num_chunks(too_many_chunks); 239 mock_stream_->set_num_chunks(too_many_chunks);
239 drainer_->Start(session_); 240 drainer_->Start(session_);
240 EXPECT_TRUE(result_waiter_.WaitForResult()); 241 EXPECT_TRUE(result_waiter_.WaitForResult());
241 } 242 }
242 243
243 } // namespace 244 } // namespace
244 245
245 } // namespace net 246 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool_unittest.cc ('k') | net/http/http_stream_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698