| 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 "base/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
| 6 #include "base/prefs/pref_value_map.h" | 6 #include "base/prefs/pref_value_map.h" |
| 7 #include "chrome/browser/extensions/external_policy_loader.h" | 7 #include "chrome/browser/extensions/external_policy_loader.h" |
| 8 #include "chrome/browser/extensions/policy_handlers.h" | 8 #include "chrome/browser/extensions/policy_handlers.h" |
| 9 #include "chrome/common/pref_names.h" | |
| 10 #include "components/policy/core/browser/policy_error_map.h" | 9 #include "components/policy/core/browser/policy_error_map.h" |
| 11 #include "components/policy/core/common/policy_map.h" | 10 #include "components/policy/core/common/policy_map.h" |
| 12 #include "components/policy/core/common/schema.h" | 11 #include "components/policy/core/common/schema.h" |
| 13 #include "extensions/browser/pref_names.h" | 12 #include "extensions/browser/pref_names.h" |
| 14 #include "policy/policy_constants.h" | 13 #include "policy/policy_constants.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 15 |
| 17 namespace extensions { | 16 namespace extensions { |
| 18 | 17 |
| 19 const char kTestPref[] = "unit_test.test_pref"; | 18 const char kTestPref[] = "unit_test.test_pref"; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 policy_value->DeepCopy(), | 345 policy_value->DeepCopy(), |
| 347 NULL); | 346 NULL); |
| 348 EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); | 347 EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
| 349 handler.ApplyPolicySettings(policy_map, &prefs); | 348 handler.ApplyPolicySettings(policy_map, &prefs); |
| 350 base::Value* value = NULL; | 349 base::Value* value = NULL; |
| 351 ASSERT_TRUE(prefs.GetValue(pref_names::kExtensionManagement, &value)); | 350 ASSERT_TRUE(prefs.GetValue(pref_names::kExtensionManagement, &value)); |
| 352 EXPECT_TRUE(base::Value::Equals(policy_value.get(), value)); | 351 EXPECT_TRUE(base::Value::Equals(policy_value.get(), value)); |
| 353 } | 352 } |
| 354 | 353 |
| 355 } // namespace extensions | 354 } // namespace extensions |
| OLD | NEW |