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

Side by Side Diff: chrome/browser/policy/policy_network_browsertest.cc

Issue 2639403004: Fix QuicAllowedPolicyDynamicTest browser_tests failures (Closed)
Patch Set: Add comment Created 3 years, 11 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 | « no previous file | 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 public: 188 public:
189 QuicAllowedPolicyDynamicTest() 189 QuicAllowedPolicyDynamicTest()
190 : InProcessBrowserTest(), profile_1_(nullptr), profile_2_(nullptr) {} 190 : InProcessBrowserTest(), profile_1_(nullptr), profile_2_(nullptr) {}
191 191
192 protected: 192 protected:
193 void SetUpCommandLine(base::CommandLine* command_line) override { 193 void SetUpCommandLine(base::CommandLine* command_line) override {
194 #if defined(OS_CHROMEOS) 194 #if defined(OS_CHROMEOS)
195 command_line->AppendSwitch( 195 command_line->AppendSwitch(
196 chromeos::switches::kIgnoreUserProfileMappingForTests); 196 chromeos::switches::kIgnoreUserProfileMappingForTests);
197 #endif 197 #endif
198 // Ensure that QUIC is enabled by default on browser startup.
199 command_line->AppendSwitch(switches::kEnableQuic);
198 } 200 }
199 201
200 void SetUpInProcessBrowserTestFixture() override { 202 void SetUpInProcessBrowserTestFixture() override {
201 // Set the overriden policy provider for the first Profile (profile_1_). 203 // Set the overriden policy provider for the first Profile (profile_1_).
202 EXPECT_CALL(policy_for_profile_1_, IsInitializationComplete(testing::_)) 204 EXPECT_CALL(policy_for_profile_1_, IsInitializationComplete(testing::_))
203 .WillRepeatedly(testing::Return(true)); 205 .WillRepeatedly(testing::Return(true));
204 policy::ProfilePolicyConnectorFactory::GetInstance() 206 policy::ProfilePolicyConnectorFactory::GetInstance()
205 ->PushProviderForTesting(&policy_for_profile_1_); 207 ->PushProviderForTesting(&policy_for_profile_1_);
206 } 208 }
207 209
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 406
405 // Disable QUIC in second profile 407 // Disable QUIC in second profile
406 SetQuicAllowedPolicy(policy_for_profile_2(), false); 408 SetQuicAllowedPolicy(policy_for_profile_2(), false);
407 EXPECT_FALSE(IsQuicEnabled(system_request_context())); 409 EXPECT_FALSE(IsQuicEnabled(system_request_context()));
408 EXPECT_FALSE(IsQuicEnabled(safe_browsing_service_request_context())); 410 EXPECT_FALSE(IsQuicEnabled(safe_browsing_service_request_context()));
409 EXPECT_FALSE(IsQuicEnabled(profile_1()->GetRequestContext())); 411 EXPECT_FALSE(IsQuicEnabled(profile_1()->GetRequestContext()));
410 EXPECT_FALSE(IsQuicEnabled(profile_2()->GetRequestContext())); 412 EXPECT_FALSE(IsQuicEnabled(profile_2()->GetRequestContext()));
411 } 413 }
412 414
413 } // namespace policy 415 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698