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/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/prefs/pref_store_observer_mock.h" | 10 #include "base/prefs/pref_store_observer_mock.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "chrome/browser/policy/configuration_policy_handler.h" | 12 #include "chrome/browser/policy/configuration_policy_handler.h" |
13 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 13 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
14 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 14 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
15 #include "chrome/browser/policy/policy_map.h" | 15 #include "chrome/browser/policy/policy_map.h" |
| 16 #include "chrome/browser/policy/policy_namespace.h" |
16 #include "chrome/browser/policy/policy_service_impl.h" | 17 #include "chrome/browser/policy/policy_service_impl.h" |
17 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 18 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
18 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 19 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
19 #include "chrome/common/content_settings.h" | 20 #include "chrome/common/content_settings.h" |
20 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
21 #include "policy/policy_constants.h" | 22 #include "policy/policy_constants.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
24 | 25 |
25 using testing::Mock; | 26 using testing::Mock; |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, | 1074 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, |
1074 POLICY_SCOPE_USER, | 1075 POLICY_SCOPE_USER, |
1075 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); | 1076 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); |
1076 UpdateProviderPolicy(policy); | 1077 UpdateProviderPolicy(policy); |
1077 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, | 1078 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, |
1078 &value)); | 1079 &value)); |
1079 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); | 1080 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); |
1080 } | 1081 } |
1081 | 1082 |
1082 } // namespace policy | 1083 } // namespace policy |
OLD | NEW |