OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 | 6 |
7 #include "chrome/browser/configuration_policy_pref_store.h" | 7 #include "chrome/browser/configuration_policy_pref_store.h" |
8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
9 | 9 |
10 TEST(ConfigurationPolicyPrefStoreTest, TestSettingHomePageDefault) { | 10 TEST(ConfigurationPolicyPrefStoreTest, TestSettingHomePageDefault) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 TEST(ConfigurationPolicyPrefStoreTest, TestSettingCookiesEnabledDefault) { | 50 TEST(ConfigurationPolicyPrefStoreTest, TestSettingCookiesEnabledDefault) { |
51 ConfigurationPolicyPrefStore store(0); | 51 ConfigurationPolicyPrefStore store(0); |
52 int result = 0; | 52 int result = 0; |
53 store.prefs()->GetInteger(prefs::kCookieBehavior, &result); | 53 store.prefs()->GetInteger(prefs::kCookieBehavior, &result); |
54 EXPECT_EQ(result, 0); | 54 EXPECT_EQ(result, 0); |
55 } | 55 } |
56 | 56 |
57 TEST(ConfigurationPolicyPrefStoreTest, TestSettingCookiesEnabledOverride) { | 57 TEST(ConfigurationPolicyPrefStoreTest, TestSettingCookiesEnabledOverride) { |
58 ConfigurationPolicyPrefStore store(0); | 58 ConfigurationPolicyPrefStore store(0); |
59 store.Apply(ConfigurationPolicyPrefStore::kPolicyCookiesEnabled, | 59 store.Apply(ConfigurationPolicyPrefStore::kPolicyCookiesMode, |
60 Value::CreateIntegerValue(2)); | 60 Value::CreateIntegerValue(2)); |
61 int result = 0; | 61 int result = 0; |
62 store.prefs()->GetInteger(prefs::kCookieBehavior, &result); | 62 store.prefs()->GetInteger(prefs::kCookieBehavior, &result); |
63 EXPECT_EQ(result, 2); | 63 EXPECT_EQ(result, 2); |
64 } | 64 } |
65 | 65 |
OLD | NEW |