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

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: Use std::move 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 14514 matching lines...) Expand 10 before | Expand all | Expand 10 after
14525 RequestPriority priority, 14525 RequestPriority priority,
14526 const SSLConfig& server_ssl_config, 14526 const SSLConfig& server_ssl_config,
14527 const SSLConfig& proxy_ssl_config, 14527 const SSLConfig& proxy_ssl_config,
14528 HttpStreamRequest::Delegate* delegate, 14528 HttpStreamRequest::Delegate* delegate,
14529 const BoundNetLog& net_log) override { 14529 const BoundNetLog& net_log) override {
14530 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate); 14530 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
14531 last_stream_request_ = fake_request->AsWeakPtr(); 14531 last_stream_request_ = fake_request->AsWeakPtr();
14532 return fake_request; 14532 return fake_request;
14533 } 14533 }
14534 14534
14535 HttpStreamRequest* RequestBidirectionalStreamJob(
14536 const HttpRequestInfo& info,
14537 RequestPriority priority,
14538 const SSLConfig& server_ssl_config,
14539 const SSLConfig& proxy_ssl_config,
14540 HttpStreamRequest::Delegate* delegate,
14541 const BoundNetLog& net_log) override {
14542 NOTREACHED();
14543 return nullptr;
14544 }
14545
14535 HttpStreamRequest* RequestWebSocketHandshakeStream( 14546 HttpStreamRequest* RequestWebSocketHandshakeStream(
14536 const HttpRequestInfo& info, 14547 const HttpRequestInfo& info,
14537 RequestPriority priority, 14548 RequestPriority priority,
14538 const SSLConfig& server_ssl_config, 14549 const SSLConfig& server_ssl_config,
14539 const SSLConfig& proxy_ssl_config, 14550 const SSLConfig& proxy_ssl_config,
14540 HttpStreamRequest::Delegate* delegate, 14551 HttpStreamRequest::Delegate* delegate,
14541 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 14552 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
14542 const BoundNetLog& net_log) override { 14553 const BoundNetLog& net_log) override {
14543 FakeStreamRequest* fake_request = 14554 FakeStreamRequest* fake_request =
14544 new FakeStreamRequest(priority, delegate, create_helper); 14555 new FakeStreamRequest(priority, delegate, create_helper);
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
15794 15805
15795 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 15806 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
15796 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); 15807 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
15797 15808
15798 EXPECT_THAT(trans.server_ssl_config_.alpn_protos, 15809 EXPECT_THAT(trans.server_ssl_config_.alpn_protos,
15799 testing::ElementsAre(kProtoHTTP2, kProtoSPDY31, kProtoHTTP11)); 15810 testing::ElementsAre(kProtoHTTP2, kProtoSPDY31, kProtoHTTP11));
15800 EXPECT_TRUE(trans.server_ssl_config_.npn_protos.empty()); 15811 EXPECT_TRUE(trans.server_ssl_config_.npn_protos.empty());
15801 } 15812 }
15802 15813
15803 } // namespace net 15814 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698