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

Side by Side Diff: chrome/browser/policy/cloud/cloud_policy_browsertest.cc

Issue 2059673002: Default the PacHttpsUrlStrippingEnabled policy to False for Chrome OS enterprise users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | components/policy/resources/policy_templates.json » ('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 <memory> 5 #include <memory>
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 policy_map->Set(key::kCaptivePortalAuthenticationIgnoresProxy, 160 policy_map->Set(key::kCaptivePortalAuthenticationIgnoresProxy,
161 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 161 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
162 POLICY_SOURCE_ENTERPRISE_DEFAULT, 162 POLICY_SOURCE_ENTERPRISE_DEFAULT,
163 base::WrapUnique(new base::FundamentalValue(false)), nullptr); 163 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
164 policy_map->Set(key::kAllowDinosaurEasterEgg, POLICY_LEVEL_MANDATORY, 164 policy_map->Set(key::kAllowDinosaurEasterEgg, POLICY_LEVEL_MANDATORY,
165 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT, 165 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
166 base::WrapUnique(new base::FundamentalValue(false)), nullptr); 166 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
167 policy_map->Set(key::kArcEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 167 policy_map->Set(key::kArcEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
168 POLICY_SOURCE_ENTERPRISE_DEFAULT, 168 POLICY_SOURCE_ENTERPRISE_DEFAULT,
169 base::WrapUnique(new base::FundamentalValue(false)), nullptr); 169 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
170 policy_map->Set(key::kPacHttpsUrlStrippingEnabled, POLICY_LEVEL_MANDATORY,
171 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
172 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
170 #endif 173 #endif
171 } 174 }
172 175
173 void GetExpectedTestPolicy(PolicyMap* expected, const char* homepage) { 176 void GetExpectedTestPolicy(PolicyMap* expected, const char* homepage) {
174 expected->Set(key::kShowHomeButton, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 177 expected->Set(key::kShowHomeButton, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
175 POLICY_SOURCE_CLOUD, 178 POLICY_SOURCE_CLOUD,
176 base::WrapUnique(new base::FundamentalValue(true)), nullptr); 179 base::WrapUnique(new base::FundamentalValue(true)), nullptr);
177 expected->Set(key::kRestoreOnStartup, POLICY_LEVEL_MANDATORY, 180 expected->Set(key::kRestoreOnStartup, POLICY_LEVEL_MANDATORY,
178 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, 181 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
179 base::WrapUnique(new base::FundamentalValue(4)), nullptr); 182 base::WrapUnique(new base::FundamentalValue(4)), nullptr);
(...skipping 19 matching lines...) Expand all
199 expected->Set(key::kCaptivePortalAuthenticationIgnoresProxy, 202 expected->Set(key::kCaptivePortalAuthenticationIgnoresProxy,
200 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 203 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
201 POLICY_SOURCE_ENTERPRISE_DEFAULT, 204 POLICY_SOURCE_ENTERPRISE_DEFAULT,
202 base::WrapUnique(new base::FundamentalValue(false)), nullptr); 205 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
203 expected->Set(key::kAllowDinosaurEasterEgg, POLICY_LEVEL_MANDATORY, 206 expected->Set(key::kAllowDinosaurEasterEgg, POLICY_LEVEL_MANDATORY,
204 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT, 207 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
205 base::WrapUnique(new base::FundamentalValue(false)), nullptr); 208 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
206 expected->Set(key::kArcEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 209 expected->Set(key::kArcEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
207 POLICY_SOURCE_ENTERPRISE_DEFAULT, 210 POLICY_SOURCE_ENTERPRISE_DEFAULT,
208 base::WrapUnique(new base::FundamentalValue(false)), nullptr); 211 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
212 expected->Set(key::kPacHttpsUrlStrippingEnabled, POLICY_LEVEL_MANDATORY,
213 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
214 base::WrapUnique(new base::FundamentalValue(false)), nullptr);
209 #endif 215 #endif
210 } 216 }
211 217
212 } // namespace 218 } // namespace
213 219
214 // Tests the cloud policy stack(s). 220 // Tests the cloud policy stack(s).
215 class CloudPolicyTest : public InProcessBrowserTest, 221 class CloudPolicyTest : public InProcessBrowserTest,
216 public PolicyService::Observer { 222 public PolicyService::Observer {
217 protected: 223 protected:
218 CloudPolicyTest() {} 224 CloudPolicyTest() {}
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 508
503 // They should now serialize to the same bytes. 509 // They should now serialize to the same bytes.
504 std::string chrome_settings_serialized; 510 std::string chrome_settings_serialized;
505 std::string cloud_policy_serialized; 511 std::string cloud_policy_serialized;
506 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); 512 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized));
507 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); 513 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized));
508 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); 514 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized);
509 } 515 }
510 516
511 } // namespace policy 517 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698