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

Side by Side Diff: net/quic/quic_network_transaction_unittest.cc

Issue 701163002: Introduce AlternateProtocolInfo.is_broken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 6 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
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 session_->http_server_properties()->SetAlternateProtocol( 279 session_->http_server_properties()->SetAlternateProtocol(
280 HostPortPair::FromURL(request_.url), 80, QUIC, 1); 280 HostPortPair::FromURL(request_.url), 80, QUIC, 1);
281 } 281 }
282 282
283 void ExpectBrokenAlternateProtocolMapping() { 283 void ExpectBrokenAlternateProtocolMapping() {
284 ASSERT_TRUE(session_->http_server_properties()->HasAlternateProtocol( 284 ASSERT_TRUE(session_->http_server_properties()->HasAlternateProtocol(
285 HostPortPair::FromURL(request_.url))); 285 HostPortPair::FromURL(request_.url)));
286 const AlternateProtocolInfo alternate = 286 const AlternateProtocolInfo alternate =
287 session_->http_server_properties()->GetAlternateProtocol( 287 session_->http_server_properties()->GetAlternateProtocol(
288 HostPortPair::FromURL(request_.url)); 288 HostPortPair::FromURL(request_.url));
289 EXPECT_EQ(ALTERNATE_PROTOCOL_BROKEN, alternate.protocol); 289 EXPECT_TRUE(alternate.is_broken);
290 } 290 }
291 291
292 void ExpectQuicAlternateProtocolMapping() { 292 void ExpectQuicAlternateProtocolMapping() {
293 ASSERT_TRUE(session_->http_server_properties()->HasAlternateProtocol( 293 ASSERT_TRUE(session_->http_server_properties()->HasAlternateProtocol(
294 HostPortPair::FromURL(request_.url))); 294 HostPortPair::FromURL(request_.url)));
295 const AlternateProtocolInfo alternate = 295 const AlternateProtocolInfo alternate =
296 session_->http_server_properties()->GetAlternateProtocol( 296 session_->http_server_properties()->GetAlternateProtocol(
297 HostPortPair::FromURL(request_.url)); 297 HostPortPair::FromURL(request_.url));
298 EXPECT_EQ(QUIC, alternate.protocol); 298 EXPECT_EQ(QUIC, alternate.protocol);
299 } 299 }
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 nullptr, 1032 nullptr,
1033 net_log_.bound()); 1033 net_log_.bound());
1034 1034
1035 CreateSessionWithNextProtos(); 1035 CreateSessionWithNextProtos();
1036 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); 1036 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
1037 SendRequestAndExpectHttpResponse("hello world"); 1037 SendRequestAndExpectHttpResponse("hello world");
1038 } 1038 }
1039 1039
1040 } // namespace test 1040 } // namespace test
1041 } // namespace net 1041 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698