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

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: Rebased Created 5 years, 1 month 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 14115 matching lines...) Expand 10 before | Expand all | Expand 10 after
14126 RequestPriority priority, 14126 RequestPriority priority,
14127 const SSLConfig& server_ssl_config, 14127 const SSLConfig& server_ssl_config,
14128 const SSLConfig& proxy_ssl_config, 14128 const SSLConfig& proxy_ssl_config,
14129 HttpStreamRequest::Delegate* delegate, 14129 HttpStreamRequest::Delegate* delegate,
14130 const BoundNetLog& net_log) override { 14130 const BoundNetLog& net_log) override {
14131 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate); 14131 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
14132 last_stream_request_ = fake_request->AsWeakPtr(); 14132 last_stream_request_ = fake_request->AsWeakPtr();
14133 return fake_request; 14133 return fake_request;
14134 } 14134 }
14135 14135
14136 HttpStreamRequest* RequestBidirectionalStreamJob(
14137 const HttpRequestInfo& info,
14138 RequestPriority priority,
14139 const SSLConfig& server_ssl_config,
14140 const SSLConfig& proxy_ssl_config,
14141 HttpStreamRequest::Delegate* delegate,
14142 const BoundNetLog& net_log) override {
14143 NOTREACHED();
14144 return nullptr;
14145 }
14146
14136 HttpStreamRequest* RequestWebSocketHandshakeStream( 14147 HttpStreamRequest* RequestWebSocketHandshakeStream(
14137 const HttpRequestInfo& info, 14148 const HttpRequestInfo& info,
14138 RequestPriority priority, 14149 RequestPriority priority,
14139 const SSLConfig& server_ssl_config, 14150 const SSLConfig& server_ssl_config,
14140 const SSLConfig& proxy_ssl_config, 14151 const SSLConfig& proxy_ssl_config,
14141 HttpStreamRequest::Delegate* delegate, 14152 HttpStreamRequest::Delegate* delegate,
14142 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 14153 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
14143 const BoundNetLog& net_log) override { 14154 const BoundNetLog& net_log) override {
14144 FakeStreamRequest* fake_request = 14155 FakeStreamRequest* fake_request =
14145 new FakeStreamRequest(priority, delegate, create_helper); 14156 new FakeStreamRequest(priority, delegate, create_helper);
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
15367 std::string response_data; 15378 std::string response_data;
15368 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 15379 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data));
15369 15380
15370 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)), 15381 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)),
15371 trans->GetTotalSentBytes()); 15382 trans->GetTotalSentBytes());
15372 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)), 15383 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)),
15373 trans->GetTotalReceivedBytes()); 15384 trans->GetTotalReceivedBytes());
15374 } 15385 }
15375 15386
15376 } // namespace net 15387 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698