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

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

Issue 2337253004: Update Token Binding code to the latest drafts (Closed)
Patch Set: Add call to CBS_len() 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
« no previous file with comments | « net/http/http_network_transaction_unittest.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) 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void GetSSLInfo(SSLInfo* ssl_info) override {} 111 void GetSSLInfo(SSLInfo* ssl_info) override {}
112 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} 112 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
113 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } 113 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; }
114 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, 114 Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
115 std::vector<uint8_t>* out) override { 115 TokenBindingType tb_type,
116 std::vector<uint8_t>* out) override {
116 ADD_FAILURE(); 117 ADD_FAILURE();
117 return ERR_NOT_IMPLEMENTED; 118 return ERR_NOT_IMPLEMENTED;
118 } 119 }
119 120
120 // Mocked API 121 // Mocked API
121 int ReadResponseBody(IOBuffer* buf, 122 int ReadResponseBody(IOBuffer* buf,
122 int buf_len, 123 int buf_len,
123 const CompletionCallback& callback) override; 124 const CompletionCallback& callback) override;
124 void Close(bool not_reusable) override { 125 void Close(bool not_reusable) override {
125 CHECK(!closed_); 126 CHECK(!closed_);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) { 337 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) {
337 mock_stream_->set_num_chunks(1); 338 mock_stream_->set_num_chunks(1);
338 mock_stream_->set_can_reuse_connection(false); 339 mock_stream_->set_can_reuse_connection(false);
339 drainer_->Start(session_.get()); 340 drainer_->Start(session_.get());
340 EXPECT_TRUE(result_waiter_.WaitForResult()); 341 EXPECT_TRUE(result_waiter_.WaitForResult());
341 } 342 }
342 343
343 } // namespace 344 } // namespace
344 345
345 } // namespace net 346 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698