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

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

Issue 524463004: Adds plumbing for always requiring handshake confirmation in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More nits fixed, test added, and formatting. Created 6 years, 3 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
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 InitializeNetworkSessionParams(&params); 313 InitializeNetworkSessionParams(&params);
314 314
315 net::QuicTagVector options; 315 net::QuicTagVector options;
316 options.push_back(net::kPACE); 316 options.push_back(net::kPACE);
317 options.push_back(net::kTIME); 317 options.push_back(net::kTIME);
318 options.push_back(net::kTBBR); 318 options.push_back(net::kTBBR);
319 options.push_back(net::kREJ); 319 options.push_back(net::kREJ);
320 EXPECT_EQ(options, params.quic_connection_options); 320 EXPECT_EQ(options, params.quic_connection_options);
321 } 321 }
322 322
323 TEST_F(IOThreadTest,
324 QuicAlwaysRequireHandshakeConfirmationFromFieldTrialParams) {
325 field_trial_group_ = "Enabled";
326 field_trial_params_["always_require_handshake_confirmation"] = "true";
327
328 ConfigureQuicGlobals();
329 net::HttpNetworkSession::Params params;
330 EXPECT_FALSE(params.quic_always_require_handshake_confirmation);
Ryan Hamilton 2014/09/02 19:28:22 I would move this line to the test EnableQuicFromF
Jana 2014/09/02 20:58:15 Done.
331 InitializeNetworkSessionParams(&params);
332 EXPECT_TRUE(params.quic_always_require_handshake_confirmation);
333 }
334
323 } // namespace test 335 } // namespace test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698