| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/prefs/pref_store_observer_mock.h" |
| 9 #include "chrome/browser/policy/configuration_policy_handler.h" | 10 #include "chrome/browser/policy/configuration_policy_handler.h" |
| 10 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 11 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 11 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 12 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
| 12 #include "chrome/browser/policy/policy_map.h" | 13 #include "chrome/browser/policy/policy_map.h" |
| 13 #include "chrome/browser/policy/policy_service_impl.h" | 14 #include "chrome/browser/policy/policy_service_impl.h" |
| 14 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 15 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 15 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 16 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| 16 #include "chrome/common/content_settings.h" | 17 #include "chrome/common/content_settings.h" |
| 17 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/common/pref_store_observer_mock.h" | |
| 19 #include "policy/policy_constants.h" | 19 #include "policy/policy_constants.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using testing::Mock; | 23 using testing::Mock; |
| 24 using testing::Return; | 24 using testing::Return; |
| 25 using testing::_; | 25 using testing::_; |
| 26 | 26 |
| 27 namespace policy { | 27 namespace policy { |
| 28 | 28 |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, | 1090 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, |
| 1091 POLICY_SCOPE_USER, | 1091 POLICY_SCOPE_USER, |
| 1092 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); | 1092 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); |
| 1093 provider_.UpdateChromePolicy(policy); | 1093 provider_.UpdateChromePolicy(policy); |
| 1094 EXPECT_EQ(PrefStore::READ_OK, | 1094 EXPECT_EQ(PrefStore::READ_OK, |
| 1095 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value)); | 1095 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value)); |
| 1096 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); | 1096 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); |
| 1097 } | 1097 } |
| 1098 | 1098 |
| 1099 } // namespace policy | 1099 } // namespace policy |
| OLD | NEW |