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

Side by Side Diff: chrome/browser/io_thread_unittest.cc

Issue 724523002: Support HTTP/2 drafts 14 and 15 simultaneously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename CONNECTION_INFO_SPDY4 to CONNECTION_INFO_HTTP2. 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 | « no previous file | components/domain_reliability/util.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/io_thread.h" 6 #include "chrome/browser/io_thread.h"
7 #include "net/http/http_network_session.h" 7 #include "net/http/http_network_session.h"
8 #include "net/http/http_server_properties_impl.h" 8 #include "net/http/http_server_properties_impl.h"
9 #include "net/quic/quic_protocol.h" 9 #include "net/quic/quic_protocol.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 EXPECT_TRUE(use_alternate_protocols); 86 EXPECT_TRUE(use_alternate_protocols);
87 } 87 }
88 88
89 TEST_F(IOThreadTest, SpdyFieldTrialSpdy4Enabled) { 89 TEST_F(IOThreadTest, SpdyFieldTrialSpdy4Enabled) {
90 bool use_alternate_protocols = false; 90 bool use_alternate_protocols = false;
91 IOThreadPeer::ConfigureSpdyFromTrial("Spdy4Enabled", &globals_); 91 IOThreadPeer::ConfigureSpdyFromTrial("Spdy4Enabled", &globals_);
92 EXPECT_THAT(globals_.next_protos, 92 EXPECT_THAT(globals_.next_protos,
93 ElementsAre(net::kProtoHTTP11, 93 ElementsAre(net::kProtoHTTP11,
94 net::kProtoQUIC1SPDY3, 94 net::kProtoQUIC1SPDY3,
95 net::kProtoSPDY31, 95 net::kProtoSPDY31,
96 net::kProtoSPDY4)); 96 net::kProtoSPDY4_14,
97 net::kProtoSPDY4_15));
97 globals_.use_alternate_protocols.CopyToIfSet(&use_alternate_protocols); 98 globals_.use_alternate_protocols.CopyToIfSet(&use_alternate_protocols);
98 EXPECT_TRUE(use_alternate_protocols); 99 EXPECT_TRUE(use_alternate_protocols);
99 } 100 }
100 101
101 TEST_F(IOThreadTest, SpdyFieldTrialSpdy4Control) { 102 TEST_F(IOThreadTest, SpdyFieldTrialSpdy4Control) {
102 bool use_alternate_protocols = false; 103 bool use_alternate_protocols = false;
103 IOThreadPeer::ConfigureSpdyFromTrial("Spdy4Control", &globals_); 104 IOThreadPeer::ConfigureSpdyFromTrial("Spdy4Control", &globals_);
104 EXPECT_THAT(globals_.next_protos, 105 EXPECT_THAT(globals_.next_protos,
105 ElementsAre(net::kProtoHTTP11, 106 ElementsAre(net::kProtoHTTP11,
106 net::kProtoQUIC1SPDY3, 107 net::kProtoQUIC1SPDY3,
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 field_trial_group_ = "Enabled"; 341 field_trial_group_ = "Enabled";
341 field_trial_params_["alternate_protocol_probability_threshold"] = ".5"; 342 field_trial_params_["alternate_protocol_probability_threshold"] = ".5";
342 343
343 ConfigureQuicGlobals(); 344 ConfigureQuicGlobals();
344 net::HttpNetworkSession::Params params; 345 net::HttpNetworkSession::Params params;
345 InitializeNetworkSessionParams(&params); 346 InitializeNetworkSessionParams(&params);
346 EXPECT_EQ(.5, params.alternate_protocol_probability_threshold); 347 EXPECT_EQ(.5, params.alternate_protocol_probability_threshold);
347 } 348 }
348 349
349 } // namespace test 350 } // namespace test
OLDNEW
« no previous file with comments | « no previous file | components/domain_reliability/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698