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

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

Issue 1326503003: Added a net::BidirectionalStream to expose a bidirectional streaming interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded return value Created 5 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 14211 matching lines...) Expand 10 before | Expand all | Expand 10 after
14222 RequestPriority priority, 14222 RequestPriority priority,
14223 const SSLConfig& server_ssl_config, 14223 const SSLConfig& server_ssl_config,
14224 const SSLConfig& proxy_ssl_config, 14224 const SSLConfig& proxy_ssl_config,
14225 HttpStreamRequest::Delegate* delegate, 14225 HttpStreamRequest::Delegate* delegate,
14226 const BoundNetLog& net_log) override { 14226 const BoundNetLog& net_log) override {
14227 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate); 14227 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
14228 last_stream_request_ = fake_request->AsWeakPtr(); 14228 last_stream_request_ = fake_request->AsWeakPtr();
14229 return fake_request; 14229 return fake_request;
14230 } 14230 }
14231 14231
14232 HttpStreamRequest* RequestBidirectionalStreamJob(
14233 const HttpRequestInfo& info,
14234 RequestPriority priority,
14235 const SSLConfig& server_ssl_config,
14236 const SSLConfig& proxy_ssl_config,
14237 HttpStreamRequest::Delegate* delegate,
14238 const BoundNetLog& net_log) override {
14239 NOTREACHED();
14240 return nullptr;
14241 }
14242
14232 HttpStreamRequest* RequestWebSocketHandshakeStream( 14243 HttpStreamRequest* RequestWebSocketHandshakeStream(
14233 const HttpRequestInfo& info, 14244 const HttpRequestInfo& info,
14234 RequestPriority priority, 14245 RequestPriority priority,
14235 const SSLConfig& server_ssl_config, 14246 const SSLConfig& server_ssl_config,
14236 const SSLConfig& proxy_ssl_config, 14247 const SSLConfig& proxy_ssl_config,
14237 HttpStreamRequest::Delegate* delegate, 14248 HttpStreamRequest::Delegate* delegate,
14238 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 14249 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
14239 const BoundNetLog& net_log) override { 14250 const BoundNetLog& net_log) override {
14240 FakeStreamRequest* fake_request = 14251 FakeStreamRequest* fake_request =
14241 new FakeStreamRequest(priority, delegate, create_helper); 14252 new FakeStreamRequest(priority, delegate, create_helper);
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
15460 std::string response_data; 15471 std::string response_data;
15461 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 15472 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data));
15462 15473
15463 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)), 15474 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)),
15464 trans->GetTotalSentBytes()); 15475 trans->GetTotalSentBytes());
15465 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)), 15476 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)),
15466 trans->GetTotalReceivedBytes()); 15477 trans->GetTotalReceivedBytes());
15467 } 15478 }
15468 15479
15469 } // namespace net 15480 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698