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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/net/proxy_policy_handler.h" | 10 #include "chrome/browser/net/proxy_policy_handler.h" |
11 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 11 #include "chrome/browser/policy/configuration_policy_pref_store_test.h" |
12 #include "chrome/browser/policy/configuration_policy_pref_store_unittest.h" | |
13 #include "chrome/browser/policy/policy_service_impl.h" | |
14 #include "chrome/browser/policy/policy_transformations.h" | 12 #include "chrome/browser/policy/policy_transformations.h" |
15 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 13 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
16 #include "chrome/browser/prefs/proxy_prefs.h" | 14 #include "chrome/browser/prefs/proxy_prefs.h" |
17 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
| 17 #include "components/policy/core/common/policy_service_impl.h" |
18 #include "policy/policy_constants.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 virtual void SetUp() OVERRIDE { | 27 virtual void SetUp() OVERRIDE { |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 for (int i = 0; i < ProxyPolicyHandler::MODE_COUNT; ++i) { | 281 for (int i = 0; i < ProxyPolicyHandler::MODE_COUNT; ++i) { |
282 policy.Set(key::kProxyServerMode, POLICY_LEVEL_MANDATORY, | 282 policy.Set(key::kProxyServerMode, POLICY_LEVEL_MANDATORY, |
283 POLICY_SCOPE_USER, base::Value::CreateIntegerValue(i), NULL); | 283 POLICY_SCOPE_USER, base::Value::CreateIntegerValue(i), NULL); |
284 UpdateProviderPolicy(policy); | 284 UpdateProviderPolicy(policy); |
285 const base::Value* value = NULL; | 285 const base::Value* value = NULL; |
286 EXPECT_FALSE(store_->GetValue(prefs::kProxy, &value)); | 286 EXPECT_FALSE(store_->GetValue(prefs::kProxy, &value)); |
287 } | 287 } |
288 } | 288 } |
289 | 289 |
290 } // namespace policy | 290 } // namespace policy |
OLD | NEW |