OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/policy/core/browser/proxy_policy_handler.h" | 5 #include "components/policy/core/browser/proxy_policy_handler.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "components/policy/core/browser/configuration_policy_pref_store.h" | 12 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
13 #include "components/policy/core/browser/configuration_policy_pref_store_test.h" | 13 #include "components/policy/core/browser/configuration_policy_pref_store_test.h" |
14 #include "components/policy/core/common/policy_service_impl.h" | 14 #include "components/policy/core/common/policy_service_impl.h" |
15 #include "components/policy/core/common/policy_types.h" | 15 #include "components/policy/core/common/policy_types.h" |
| 16 #include "components/policy/policy_constants.h" |
16 #include "components/proxy_config/proxy_config_dictionary.h" | 17 #include "components/proxy_config/proxy_config_dictionary.h" |
17 #include "components/proxy_config/proxy_config_pref_names.h" | 18 #include "components/proxy_config/proxy_config_pref_names.h" |
18 #include "policy/policy_constants.h" | |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace policy { | 21 namespace policy { |
22 | 22 |
23 // Test cases for the proxy policy settings. | 23 // Test cases for the proxy policy settings. |
24 class ProxyPolicyHandlerTest | 24 class ProxyPolicyHandlerTest |
25 : public ConfigurationPolicyPrefStoreTest { | 25 : public ConfigurationPolicyPrefStoreTest { |
26 public: | 26 public: |
27 void SetUp() override { | 27 void SetUp() override { |
28 ConfigurationPolicyPrefStoreTest::SetUp(); | 28 ConfigurationPolicyPrefStoreTest::SetUp(); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 policy.Set(key::kProxyServerMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 300 policy.Set(key::kProxyServerMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
301 POLICY_SOURCE_CLOUD, | 301 POLICY_SOURCE_CLOUD, |
302 base::WrapUnique(new base::FundamentalValue(i)), nullptr); | 302 base::WrapUnique(new base::FundamentalValue(i)), nullptr); |
303 UpdateProviderPolicy(policy); | 303 UpdateProviderPolicy(policy); |
304 const base::Value* value = nullptr; | 304 const base::Value* value = nullptr; |
305 EXPECT_FALSE(store_->GetValue(proxy_config::prefs::kProxy, &value)); | 305 EXPECT_FALSE(store_->GetValue(proxy_config::prefs::kProxy, &value)); |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
309 } // namespace policy | 309 } // namespace policy |
OLD | NEW |