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

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

Issue 2298823002: Resetting the HttpRequestInfo pointers in HttpNetworkTransaction and streams (Closed)
Patch Set: Rebased, removed upload progress plumbing, feedback. (Rebased till refs/heads/master@{#417381}) Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstring> 9 #include <cstring>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 RequestPriority priority, 92 RequestPriority priority,
93 const BoundNetLog& net_log, 93 const BoundNetLog& net_log,
94 const CompletionCallback& callback) override { 94 const CompletionCallback& callback) override {
95 return ERR_UNEXPECTED; 95 return ERR_UNEXPECTED;
96 } 96 }
97 int SendRequest(const HttpRequestHeaders& request_headers, 97 int SendRequest(const HttpRequestHeaders& request_headers,
98 HttpResponseInfo* response, 98 HttpResponseInfo* response,
99 const CompletionCallback& callback) override { 99 const CompletionCallback& callback) override {
100 return ERR_UNEXPECTED; 100 return ERR_UNEXPECTED;
101 } 101 }
102 UploadProgress GetUploadProgress() const override { return UploadProgress(); }
103 int ReadResponseHeaders(const CompletionCallback& callback) override { 102 int ReadResponseHeaders(const CompletionCallback& callback) override {
104 return ERR_UNEXPECTED; 103 return ERR_UNEXPECTED;
105 } 104 }
106 105
107 bool IsConnectionReused() const override { return false; } 106 bool IsConnectionReused() const override { return false; }
108 void SetConnectionReused() override {} 107 void SetConnectionReused() override {}
109 bool CanReuseConnection() const override { return can_reuse_connection_; } 108 bool CanReuseConnection() const override { return can_reuse_connection_; }
110 int64_t GetTotalReceivedBytes() const override { return 0; } 109 int64_t GetTotalReceivedBytes() const override { return 0; }
111 int64_t GetTotalSentBytes() const override { return 0; } 110 int64_t GetTotalSentBytes() const override { return 0; }
112 void GetSSLInfo(SSLInfo* ssl_info) override {} 111 void GetSSLInfo(SSLInfo* ssl_info) override {}
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) { 336 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) {
338 mock_stream_->set_num_chunks(1); 337 mock_stream_->set_num_chunks(1);
339 mock_stream_->set_can_reuse_connection(false); 338 mock_stream_->set_can_reuse_connection(false);
340 drainer_->Start(session_.get()); 339 drainer_->Start(session_.get());
341 EXPECT_TRUE(result_waiter_.WaitForResult()); 340 EXPECT_TRUE(result_waiter_.WaitForResult());
342 } 341 }
343 342
344 } // namespace 343 } // namespace
345 344
346 } // namespace net 345 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698