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

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: Get rid of Delegate::OnClose 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 14213 matching lines...) Expand 10 before | Expand all | Expand 10 after
14224 RequestPriority priority, 14224 RequestPriority priority,
14225 const SSLConfig& server_ssl_config, 14225 const SSLConfig& server_ssl_config,
14226 const SSLConfig& proxy_ssl_config, 14226 const SSLConfig& proxy_ssl_config,
14227 HttpStreamRequest::Delegate* delegate, 14227 HttpStreamRequest::Delegate* delegate,
14228 const BoundNetLog& net_log) override { 14228 const BoundNetLog& net_log) override {
14229 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate); 14229 FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
14230 last_stream_request_ = fake_request->AsWeakPtr(); 14230 last_stream_request_ = fake_request->AsWeakPtr();
14231 return fake_request; 14231 return fake_request;
14232 } 14232 }
14233 14233
14234 HttpStreamRequest* RequestBidirectionalStreamJob(
14235 const HttpRequestInfo& info,
14236 RequestPriority priority,
14237 const SSLConfig& server_ssl_config,
14238 const SSLConfig& proxy_ssl_config,
14239 HttpStreamRequest::Delegate* delegate,
14240 const BoundNetLog& net_log) override {
14241 NOTREACHED();
14242 return nullptr;
14243 }
14244
14234 HttpStreamRequest* RequestWebSocketHandshakeStream( 14245 HttpStreamRequest* RequestWebSocketHandshakeStream(
14235 const HttpRequestInfo& info, 14246 const HttpRequestInfo& info,
14236 RequestPriority priority, 14247 RequestPriority priority,
14237 const SSLConfig& server_ssl_config, 14248 const SSLConfig& server_ssl_config,
14238 const SSLConfig& proxy_ssl_config, 14249 const SSLConfig& proxy_ssl_config,
14239 HttpStreamRequest::Delegate* delegate, 14250 HttpStreamRequest::Delegate* delegate,
14240 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 14251 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
14241 const BoundNetLog& net_log) override { 14252 const BoundNetLog& net_log) override {
14242 FakeStreamRequest* fake_request = 14253 FakeStreamRequest* fake_request =
14243 new FakeStreamRequest(priority, delegate, create_helper); 14254 new FakeStreamRequest(priority, delegate, create_helper);
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
15493 15504
15494 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 15505 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
15495 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); 15506 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
15496 15507
15497 EXPECT_THAT(trans.server_ssl_config_.alpn_protos, 15508 EXPECT_THAT(trans.server_ssl_config_.alpn_protos,
15498 testing::ElementsAre(kProtoHTTP2, kProtoSPDY31, kProtoHTTP11)); 15509 testing::ElementsAre(kProtoHTTP2, kProtoSPDY31, kProtoHTTP11));
15499 EXPECT_TRUE(trans.server_ssl_config_.npn_protos.empty()); 15510 EXPECT_TRUE(trans.server_ssl_config_.npn_protos.empty());
15500 } 15511 }
15501 15512
15502 } // namespace net 15513 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698