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

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

Issue 12326073: Remove the --use-spdy-over-quic command line option. Always use SPDY over QUIC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_stream_factory.h » ('j') | 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/base/mock_cert_verifier.h" 8 #include "net/base/mock_cert_verifier.h"
9 #include "net/base/mock_host_resolver.h" 9 #include "net/base/mock_host_resolver.h"
10 #include "net/base/ssl_config_service_defaults.h" 10 #include "net/base/ssl_config_service_defaults.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 MockRandom random_generator_; 237 MockRandom random_generator_;
238 HttpServerPropertiesImpl http_server_properties; 238 HttpServerPropertiesImpl http_server_properties;
239 HttpNetworkSession::Params params_; 239 HttpNetworkSession::Params params_;
240 }; 240 };
241 241
242 TEST_F(QuicNetworkTransactionTest, UseAlternateProtocolForQuic) { 242 TEST_F(QuicNetworkTransactionTest, UseAlternateProtocolForQuic) {
243 HttpStreamFactory::set_use_alternate_protocols(true); 243 HttpStreamFactory::set_use_alternate_protocols(true);
244 HttpStreamFactory::SetNextProtos(QuicNextProtos()); 244 HttpStreamFactory::SetNextProtos(QuicNextProtos());
245 params_.enable_quic = true; 245 params_.enable_quic = true;
246 params_.quic_clock = clock_; 246 params_.quic_clock = clock_;
247 params_.use_spdy_over_quic = true;
248 params_.quic_random = &random_generator_; 247 params_.quic_random = &random_generator_;
249 248
250 HttpRequestInfo request; 249 HttpRequestInfo request;
251 request.method = "GET"; 250 request.method = "GET";
252 request.url = GURL("http://www.google.com/"); 251 request.url = GURL("http://www.google.com/");
253 request.load_flags = 0; 252 request.load_flags = 0;
254 253
255 MockRead data_reads[] = { 254 MockRead data_reads[] = {
256 MockRead("HTTP/1.1 200 OK\r\n"), 255 MockRead("HTTP/1.1 200 OK\r\n"),
257 MockRead(kQuicAlternateProtocolHttpHeader), 256 MockRead(kQuicAlternateProtocolHttpHeader),
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 ASSERT_TRUE(response->headers != NULL); 331 ASSERT_TRUE(response->headers != NULL);
333 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 332 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
334 EXPECT_TRUE(response->was_fetched_via_spdy); 333 EXPECT_TRUE(response->was_fetched_via_spdy);
335 334
336 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 335 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
337 EXPECT_EQ("hello!", response_data); 336 EXPECT_EQ("hello!", response_data);
338 } 337 }
339 338
340 } // namespace test 339 } // namespace test
341 } // namespace net 340 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698