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

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: Fix compilation error in unit_tests 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 bool IsConnectionReused() const override { return false; } 107 bool IsConnectionReused() const override { return false; }
108 void SetConnectionReused() override {} 108 void SetConnectionReused() override {}
109 bool CanReuseConnection() const override { return can_reuse_connection_; } 109 bool CanReuseConnection() const override { return can_reuse_connection_; }
110 int64_t GetTotalReceivedBytes() const override { return 0; } 110 int64_t GetTotalReceivedBytes() const override { return 0; }
111 int64_t GetTotalSentBytes() const override { return 0; } 111 int64_t GetTotalSentBytes() const override { return 0; }
112 void GetSSLInfo(SSLInfo* ssl_info) override {} 112 void GetSSLInfo(SSLInfo* ssl_info) override {}
113 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} 113 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
114 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } 114 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; }
115 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, 115 Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
116 std::vector<uint8_t>* out) override { 116 TokenBindingType tb_type,
117 std::vector<uint8_t>* out) override {
117 ADD_FAILURE(); 118 ADD_FAILURE();
118 return ERR_NOT_IMPLEMENTED; 119 return ERR_NOT_IMPLEMENTED;
119 } 120 }
120 121
121 // Mocked API 122 // Mocked API
122 int ReadResponseBody(IOBuffer* buf, 123 int ReadResponseBody(IOBuffer* buf,
123 int buf_len, 124 int buf_len,
124 const CompletionCallback& callback) override; 125 const CompletionCallback& callback) override;
125 void Close(bool not_reusable) override { 126 void Close(bool not_reusable) override {
126 CHECK(!closed_); 127 CHECK(!closed_);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) { 338 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) {
338 mock_stream_->set_num_chunks(1); 339 mock_stream_->set_num_chunks(1);
339 mock_stream_->set_can_reuse_connection(false); 340 mock_stream_->set_can_reuse_connection(false);
340 drainer_->Start(session_.get()); 341 drainer_->Start(session_.get());
341 EXPECT_TRUE(result_waiter_.WaitForResult()); 342 EXPECT_TRUE(result_waiter_.WaitForResult());
342 } 343 }
343 344
344 } // namespace 345 } // namespace
345 346
346 } // namespace net 347 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698