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

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

Issue 2805043004: Add a GetAlternativeService method to HttpStream to return any (Closed)
Patch Set: Created 3 years, 8 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 int ReadResponseHeaders(const CompletionCallback& callback) override { 102 int ReadResponseHeaders(const CompletionCallback& callback) override {
103 return ERR_UNEXPECTED; 103 return ERR_UNEXPECTED;
104 } 104 }
105 105
106 bool IsConnectionReused() const override { return false; } 106 bool IsConnectionReused() const override { return false; }
107 void SetConnectionReused() override {} 107 void SetConnectionReused() override {}
108 bool CanReuseConnection() const override { return can_reuse_connection_; } 108 bool CanReuseConnection() const override { return can_reuse_connection_; }
109 int64_t GetTotalReceivedBytes() const override { return 0; } 109 int64_t GetTotalReceivedBytes() const override { return 0; }
110 int64_t GetTotalSentBytes() const override { return 0; } 110 int64_t GetTotalSentBytes() const override { return 0; }
111 bool GetAlternativeService(
112 AlternativeService* alternative_service) const override {
113 return false;
114 }
111 void GetSSLInfo(SSLInfo* ssl_info) override {} 115 void GetSSLInfo(SSLInfo* ssl_info) override {}
112 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} 116 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
113 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } 117 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; }
114 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, 118 Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
115 TokenBindingType tb_type, 119 TokenBindingType tb_type,
116 std::vector<uint8_t>* out) override { 120 std::vector<uint8_t>* out) override {
117 ADD_FAILURE(); 121 ADD_FAILURE();
118 return ERR_NOT_IMPLEMENTED; 122 return ERR_NOT_IMPLEMENTED;
119 } 123 }
120 124
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) { 341 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) {
338 mock_stream_->set_num_chunks(1); 342 mock_stream_->set_num_chunks(1);
339 mock_stream_->set_can_reuse_connection(false); 343 mock_stream_->set_can_reuse_connection(false);
340 drainer_->Start(session_.get()); 344 drainer_->Start(session_.get());
341 EXPECT_TRUE(result_waiter_.WaitForResult()); 345 EXPECT_TRUE(result_waiter_.WaitForResult());
342 } 346 }
343 347
344 } // namespace 348 } // namespace
345 349
346 } // namespace net 350 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698