| 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 "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 8 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 9 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 9 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| 11 #include "chrome/common/chrome_switches.h" | |
| 12 | 11 |
| 13 namespace policy { | 12 namespace policy { |
| 14 | 13 |
| 15 // Holds a set of test parameters, consisting of pref name and policy type. | 14 // Holds a set of test parameters, consisting of pref name and policy type. |
| 16 class TypeAndName { | 15 class TypeAndName { |
| 17 public: | 16 public: |
| 18 TypeAndName(ConfigurationPolicyType type, const char* pref_name) | 17 TypeAndName(ConfigurationPolicyType type, const char* pref_name) |
| 19 : type_(type), | 18 : type_(type), |
| 20 pref_name_(pref_name) {} | 19 pref_name_(pref_name) {} |
| 21 | 20 |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 621 |
| 623 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { | 622 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { |
| 624 store_.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); | 623 store_.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); |
| 625 // Disabling AutoFill should switch the pref to managed. | 624 // Disabling AutoFill should switch the pref to managed. |
| 626 bool result = true; | 625 bool result = true; |
| 627 EXPECT_TRUE(store_.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); | 626 EXPECT_TRUE(store_.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); |
| 628 EXPECT_FALSE(result); | 627 EXPECT_FALSE(result); |
| 629 } | 628 } |
| 630 | 629 |
| 631 } // namespace policy | 630 } // namespace policy |
| OLD | NEW |