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

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

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: Remove sequence numbers from mock reads Created 4 years, 11 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 bool IsConnectionReused() const override { return false; } 102 bool IsConnectionReused() const override { return false; }
103 void SetConnectionReused() override {} 103 void SetConnectionReused() override {}
104 bool CanReuseConnection() const override { return false; } 104 bool CanReuseConnection() const override { return false; }
105 int64_t GetTotalReceivedBytes() const override { return 0; } 105 int64_t GetTotalReceivedBytes() const override { return 0; }
106 int64_t GetTotalSentBytes() const override { return 0; } 106 int64_t GetTotalSentBytes() const override { return 0; }
107 void GetSSLInfo(SSLInfo* ssl_info) override {} 107 void GetSSLInfo(SSLInfo* ssl_info) override {}
108 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} 108 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
109 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } 109 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; }
110 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key,
111 std::vector<uint8_t>* out) override {
112 ADD_FAILURE();
113 return ERR_NOT_IMPLEMENTED;
114 }
110 115
111 // Mocked API 116 // Mocked API
112 int ReadResponseBody(IOBuffer* buf, 117 int ReadResponseBody(IOBuffer* buf,
113 int buf_len, 118 int buf_len,
114 const CompletionCallback& callback) override; 119 const CompletionCallback& callback) override;
115 void Close(bool not_reusable) override { 120 void Close(bool not_reusable) override {
116 CHECK(!closed_); 121 CHECK(!closed_);
117 closed_ = true; 122 closed_ = true;
118 result_waiter_->set_result(not_reusable); 123 result_waiter_->set_result(not_reusable);
119 } 124 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 too_many_chunks += 1; // Now it's too large. 311 too_many_chunks += 1; // Now it's too large.
307 312
308 mock_stream_->set_num_chunks(too_many_chunks); 313 mock_stream_->set_num_chunks(too_many_chunks);
309 drainer_->Start(session_.get()); 314 drainer_->Start(session_.get());
310 EXPECT_TRUE(result_waiter_.WaitForResult()); 315 EXPECT_TRUE(result_waiter_.WaitForResult());
311 } 316 }
312 317
313 } // namespace 318 } // namespace
314 319
315 } // namespace net 320 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698