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

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: Created 5 years, 2 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 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 13471 matching lines...) Expand 10 before | Expand all | Expand 10 after
13482 RequestPriority priority, 13482 RequestPriority priority,
13483 const SSLConfig& server_ssl_config, 13483 const SSLConfig& server_ssl_config,
13484 const SSLConfig& proxy_ssl_config, 13484 const SSLConfig& proxy_ssl_config,
13485 HttpStreamRequest::Delegate* delegate, 13485 HttpStreamRequest::Delegate* delegate,
13486 const BoundNetLog& net_log) override { 13486 const BoundNetLog& net_log) override {
13487 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate); 13487 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
13488 last_stream_request_ = fake_request->AsWeakPtr(); 13488 last_stream_request_ = fake_request->AsWeakPtr();
13489 return fake_request; 13489 return fake_request;
13490 } 13490 }
13491 13491
13492 HttpStreamRequest* RequestBidirectionalStream(
13493 const HttpRequestInfo& info,
13494 RequestPriority priority,
13495 const SSLConfig& server_ssl_config,
13496 const SSLConfig& proxy_ssl_config,
13497 HttpStreamRequest::Delegate* delegate,
13498 const BoundNetLog& net_log) override {
13499 NOTREACHED();
13500 return nullptr;
13501 }
13502
13492 HttpStreamRequest* RequestWebSocketHandshakeStream( 13503 HttpStreamRequest* RequestWebSocketHandshakeStream(
13493 const HttpRequestInfo& info, 13504 const HttpRequestInfo& info,
13494 RequestPriority priority, 13505 RequestPriority priority,
13495 const SSLConfig& server_ssl_config, 13506 const SSLConfig& server_ssl_config,
13496 const SSLConfig& proxy_ssl_config, 13507 const SSLConfig& proxy_ssl_config,
13497 HttpStreamRequest::Delegate* delegate, 13508 HttpStreamRequest::Delegate* delegate,
13498 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 13509 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
13499 const BoundNetLog& net_log) override { 13510 const BoundNetLog& net_log) override {
13500 FakeStreamRequest* fake_request = 13511 FakeStreamRequest* fake_request =
13501 new FakeStreamRequest(priority, delegate, create_helper); 13512 new FakeStreamRequest(priority, delegate, create_helper);
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
14721 std::string response_data; 14732 std::string response_data;
14722 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 14733 EXPECT_EQ(OK, ReadTransaction(trans.get(), &response_data));
14723 14734
14724 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)), 14735 EXPECT_EQ(CountWriteBytes(data_writes, arraysize(data_writes)),
14725 trans->GetTotalSentBytes()); 14736 trans->GetTotalSentBytes());
14726 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)), 14737 EXPECT_EQ(CountReadBytes(data_reads, arraysize(data_reads)),
14727 trans->GetTotalReceivedBytes()); 14738 trans->GetTotalReceivedBytes());
14728 } 14739 }
14729 14740
14730 } // namespace net 14741 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698