| 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/common/configuration_policy_provider_test.h" | 5 #include "components/policy/core/common/configuration_policy_provider_test.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 180 } |
| 181 | 181 |
| 182 ConfigurationPolicyProviderTest::ConfigurationPolicyProviderTest() {} | 182 ConfigurationPolicyProviderTest::ConfigurationPolicyProviderTest() {} |
| 183 | 183 |
| 184 ConfigurationPolicyProviderTest::~ConfigurationPolicyProviderTest() {} | 184 ConfigurationPolicyProviderTest::~ConfigurationPolicyProviderTest() {} |
| 185 | 185 |
| 186 void ConfigurationPolicyProviderTest::SetUp() { | 186 void ConfigurationPolicyProviderTest::SetUp() { |
| 187 PolicyTestBase::SetUp(); | 187 PolicyTestBase::SetUp(); |
| 188 | 188 |
| 189 test_harness_.reset((*GetParam())()); | 189 test_harness_.reset((*GetParam())()); |
| 190 test_harness_->SetUp(); | 190 ASSERT_NO_FATAL_FAILURE(test_harness_->SetUp()); |
| 191 | 191 |
| 192 const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, ""); | 192 const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, ""); |
| 193 Schema chrome_schema = *schema_registry_.schema_map()->GetSchema(chrome_ns); | 193 Schema chrome_schema = *schema_registry_.schema_map()->GetSchema(chrome_ns); |
| 194 Schema extension_schema = | 194 Schema extension_schema = |
| 195 chrome_schema.GetKnownProperty(test_keys::kKeyDictionary); | 195 chrome_schema.GetKnownProperty(test_keys::kKeyDictionary); |
| 196 ASSERT_TRUE(extension_schema.valid()); | 196 ASSERT_TRUE(extension_schema.valid()); |
| 197 schema_registry_.RegisterComponent( | 197 schema_registry_.RegisterComponent( |
| 198 PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, | 198 PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, |
| 199 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), | 199 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), |
| 200 extension_schema); | 200 extension_schema); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, | 415 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, |
| 416 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) | 416 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) |
| 417 .CopyFrom(expected_policy); | 417 .CopyFrom(expected_policy); |
| 418 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, | 418 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, |
| 419 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) | 419 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) |
| 420 .CopyFrom(expected_policy); | 420 .CopyFrom(expected_policy); |
| 421 EXPECT_TRUE(provider_->policies().Equals(expected_bundle)); | 421 EXPECT_TRUE(provider_->policies().Equals(expected_bundle)); |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace policy | 424 } // namespace policy |
| OLD | NEW |