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

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

Issue 2253653002: Only allow HTTP/0.9 support on default ports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/errorpage_browsertest.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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class IOThreadPeer { 49 class IOThreadPeer {
50 public: 50 public:
51 static net::HttpAuthPreferences* GetAuthPreferences(IOThread* io_thread) { 51 static net::HttpAuthPreferences* GetAuthPreferences(IOThread* io_thread) {
52 return io_thread->globals()->http_auth_preferences.get(); 52 return io_thread->globals()->http_auth_preferences.get();
53 } 53 }
54 static void ConfigureParamsFromFieldTrialsAndCommandLine( 54 static void ConfigureParamsFromFieldTrialsAndCommandLine(
55 const base::CommandLine& command_line, 55 const base::CommandLine& command_line,
56 bool is_quic_allowed_by_policy, 56 bool is_quic_allowed_by_policy,
57 net::HttpNetworkSession::Params* params) { 57 net::HttpNetworkSession::Params* params) {
58 IOThread::ConfigureParamsFromFieldTrialsAndCommandLine( 58 IOThread::ConfigureParamsFromFieldTrialsAndCommandLine(
59 command_line, is_quic_allowed_by_policy, params); 59 command_line, is_quic_allowed_by_policy, false, params);
60 } 60 }
61 }; 61 };
62 62
63 class IOThreadTestWithIOThreadObject : public testing::Test { 63 class IOThreadTestWithIOThreadObject : public testing::Test {
64 public: 64 public:
65 // These functions need to be public, since it is difficult to bind to 65 // These functions need to be public, since it is difficult to bind to
66 // protected functions in a test (the code would need to explicitly contain 66 // protected functions in a test (the code would need to explicitly contain
67 // the name of the actual test class). 67 // the name of the actual test class).
68 void CheckCnameLookup(bool expected) { 68 void CheckCnameLookup(bool expected) {
69 auto* http_auth_preferences = 69 auto* http_auth_preferences =
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 command_line_.AppendSwitchASCII("testing-fixed-http-port", "42"); 457 command_line_.AppendSwitchASCII("testing-fixed-http-port", "42");
458 command_line_.AppendSwitchASCII("testing-fixed-https-port", "137"); 458 command_line_.AppendSwitchASCII("testing-fixed-https-port", "137");
459 459
460 ConfigureParamsFromFieldTrialsAndCommandLine(); 460 ConfigureParamsFromFieldTrialsAndCommandLine();
461 461
462 EXPECT_EQ(42u, params_.testing_fixed_http_port); 462 EXPECT_EQ(42u, params_.testing_fixed_http_port);
463 EXPECT_EQ(137u, params_.testing_fixed_https_port); 463 EXPECT_EQ(137u, params_.testing_fixed_https_port);
464 } 464 }
465 465
466 } // namespace test 466 } // namespace test
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/errorpage_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698