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

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

Issue 7289006: Basic HTTP pipelining support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 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_pipelined_stream.cc ('k') | net/http/http_stream.h » ('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) 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_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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual HttpStream* RenewStreamForAuth() OVERRIDE { 113 virtual HttpStream* RenewStreamForAuth() OVERRIDE {
114 return NULL; 114 return NULL;
115 } 115 }
116 116
117 virtual bool IsResponseBodyComplete() const OVERRIDE { return is_complete_; } 117 virtual bool IsResponseBodyComplete() const OVERRIDE { return is_complete_; }
118 118
119 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; } 119 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; }
120 120
121 virtual void LogNumRttVsBytesMetrics() const OVERRIDE {} 121 virtual void LogNumRttVsBytesMetrics() const OVERRIDE {}
122 122
123 virtual void Drain(HttpNetworkSession*) OVERRIDE {}
124
123 // Methods to tweak/observer mock behavior: 125 // Methods to tweak/observer mock behavior:
124 void StallReadsForever() { stall_reads_forever_ = true; } 126 void StallReadsForever() { stall_reads_forever_ = true; }
125 127
126 void set_num_chunks(int num_chunks) { num_chunks_ = num_chunks; } 128 void set_num_chunks(int num_chunks) { num_chunks_ = num_chunks; }
127 129
128 private: 130 private:
129 void CompleteRead(); 131 void CompleteRead();
130 132
131 bool closed() const { return closed_; } 133 bool closed() const { return closed_; }
132 134
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 too_many_chunks += 1; // Now it's too large. 250 too_many_chunks += 1; // Now it's too large.
249 251
250 mock_stream_->set_num_chunks(too_many_chunks); 252 mock_stream_->set_num_chunks(too_many_chunks);
251 drainer_->Start(session_); 253 drainer_->Start(session_);
252 EXPECT_TRUE(result_waiter_.WaitForResult()); 254 EXPECT_TRUE(result_waiter_.WaitForResult());
253 } 255 }
254 256
255 } // namespace 257 } // namespace
256 258
257 } // namespace net 259 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_pipelined_stream.cc ('k') | net/http/http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698