OLD | NEW |
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/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 void GetExpectedDefaultPolicy(PolicyMap* policy_map) { | 139 void GetExpectedDefaultPolicy(PolicyMap* policy_map) { |
140 #if defined(OS_CHROMEOS) | 140 #if defined(OS_CHROMEOS) |
141 policy_map->Set( | 141 policy_map->Set( |
142 key::kChromeOsMultiProfileUserBehavior, POLICY_LEVEL_MANDATORY, | 142 key::kChromeOsMultiProfileUserBehavior, POLICY_LEVEL_MANDATORY, |
143 POLICY_SCOPE_USER, base::Value::CreateStringValue("primary-only"), NULL); | 143 POLICY_SCOPE_USER, base::Value::CreateStringValue("primary-only"), NULL); |
144 #endif | 144 #endif |
145 } | 145 } |
146 | 146 |
147 void GetExpectedTestPolicy(PolicyMap* expected, const char* homepage) { | 147 void GetExpectedTestPolicy(PolicyMap* expected, const char* homepage) { |
148 expected->Set(key::kShowHomeButton, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 148 expected->Set(key::kShowHomeButton, |
149 base::Value::CreateBooleanValue(true), NULL); | 149 POLICY_LEVEL_MANDATORY, |
| 150 POLICY_SCOPE_USER, |
| 151 new base::FundamentalValue(true), |
| 152 NULL); |
150 expected->Set(key::kRestoreOnStartup, POLICY_LEVEL_MANDATORY, | 153 expected->Set(key::kRestoreOnStartup, POLICY_LEVEL_MANDATORY, |
151 POLICY_SCOPE_USER, base::Value::CreateIntegerValue(4), NULL); | 154 POLICY_SCOPE_USER, base::Value::CreateIntegerValue(4), NULL); |
152 base::ListValue list; | 155 base::ListValue list; |
153 list.AppendString("dev.chromium.org"); | 156 list.AppendString("dev.chromium.org"); |
154 list.AppendString("youtube.com"); | 157 list.AppendString("youtube.com"); |
155 expected->Set( | 158 expected->Set( |
156 key::kURLBlacklist, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 159 key::kURLBlacklist, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
157 list.DeepCopy(), NULL); | 160 list.DeepCopy(), NULL); |
158 expected->Set( | 161 expected->Set( |
159 key::kMaxInvalidationFetchDelay, POLICY_LEVEL_MANDATORY, | 162 key::kMaxInvalidationFetchDelay, POLICY_LEVEL_MANDATORY, |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 | 462 |
460 // They should now serialize to the same bytes. | 463 // They should now serialize to the same bytes. |
461 std::string chrome_settings_serialized; | 464 std::string chrome_settings_serialized; |
462 std::string cloud_policy_serialized; | 465 std::string cloud_policy_serialized; |
463 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); | 466 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); |
464 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); | 467 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); |
465 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); | 468 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); |
466 } | 469 } |
467 | 470 |
468 } // namespace policy | 471 } // namespace policy |
OLD | NEW |