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

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

Issue 818433003: ChromeOS: Implement CaptivePortalAuthenticationIgnoresProxy policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests fixed. Created 5 years, 9 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 (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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 policy_map->Set(key::kChromeOsMultiProfileUserBehavior, 141 policy_map->Set(key::kChromeOsMultiProfileUserBehavior,
142 POLICY_LEVEL_MANDATORY, 142 POLICY_LEVEL_MANDATORY,
143 POLICY_SCOPE_USER, 143 POLICY_SCOPE_USER,
144 new base::StringValue("primary-only"), 144 new base::StringValue("primary-only"),
145 NULL); 145 NULL);
146 policy_map->Set(key::kEasyUnlockAllowed, 146 policy_map->Set(key::kEasyUnlockAllowed,
147 POLICY_LEVEL_MANDATORY, 147 POLICY_LEVEL_MANDATORY,
148 POLICY_SCOPE_USER, 148 POLICY_SCOPE_USER,
149 new base::FundamentalValue(false), 149 new base::FundamentalValue(false),
150 NULL); 150 NULL);
151 policy_map->Set(key::kCaptivePortalAuthenticationIgnoresProxy,
152 POLICY_LEVEL_MANDATORY,
153 POLICY_SCOPE_USER,
154 new base::FundamentalValue(false),
155 NULL);
151 #endif 156 #endif
152 } 157 }
153 158
154 void GetExpectedTestPolicy(PolicyMap* expected, const char* homepage) { 159 void GetExpectedTestPolicy(PolicyMap* expected, const char* homepage) {
155 expected->Set(key::kShowHomeButton, 160 expected->Set(key::kShowHomeButton,
156 POLICY_LEVEL_MANDATORY, 161 POLICY_LEVEL_MANDATORY,
157 POLICY_SCOPE_USER, 162 POLICY_SCOPE_USER,
158 new base::FundamentalValue(true), 163 new base::FundamentalValue(true),
159 NULL); 164 NULL);
160 expected->Set(key::kRestoreOnStartup, 165 expected->Set(key::kRestoreOnStartup,
(...skipping 21 matching lines...) Expand all
182 expected->Set(key::kChromeOsMultiProfileUserBehavior, 187 expected->Set(key::kChromeOsMultiProfileUserBehavior,
183 POLICY_LEVEL_MANDATORY, 188 POLICY_LEVEL_MANDATORY,
184 POLICY_SCOPE_USER, 189 POLICY_SCOPE_USER,
185 new base::StringValue("primary-only"), 190 new base::StringValue("primary-only"),
186 NULL); 191 NULL);
187 expected->Set(key::kEasyUnlockAllowed, 192 expected->Set(key::kEasyUnlockAllowed,
188 POLICY_LEVEL_MANDATORY, 193 POLICY_LEVEL_MANDATORY,
189 POLICY_SCOPE_USER, 194 POLICY_SCOPE_USER,
190 new base::FundamentalValue(false), 195 new base::FundamentalValue(false),
191 NULL); 196 NULL);
197 expected->Set(key::kCaptivePortalAuthenticationIgnoresProxy,
198 POLICY_LEVEL_MANDATORY,
199 POLICY_SCOPE_USER,
200 new base::FundamentalValue(false),
201 NULL);
192 #endif 202 #endif
193 } 203 }
194 204
195 } // namespace 205 } // namespace
196 206
197 // Tests the cloud policy stack(s). 207 // Tests the cloud policy stack(s).
198 class CloudPolicyTest : public InProcessBrowserTest, 208 class CloudPolicyTest : public InProcessBrowserTest,
199 public PolicyService::Observer { 209 public PolicyService::Observer {
200 protected: 210 protected:
201 CloudPolicyTest() {} 211 CloudPolicyTest() {}
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 494
485 // They should now serialize to the same bytes. 495 // They should now serialize to the same bytes.
486 std::string chrome_settings_serialized; 496 std::string chrome_settings_serialized;
487 std::string cloud_policy_serialized; 497 std::string cloud_policy_serialized;
488 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); 498 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized));
489 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); 499 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized));
490 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); 500 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized);
491 } 501 }
492 502
493 } // namespace policy 503 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/policy/configuration_policy_handler_list_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698