| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/policy/policy_domain_descriptor.h" | 5 #include "chrome/browser/policy/policy_domain_descriptor.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/policy/external_data_fetcher.h" | 12 #include "chrome/browser/policy/external_data_fetcher.h" |
| 13 #include "chrome/browser/policy/external_data_manager.h" | 13 #include "chrome/browser/policy/external_data_manager.h" |
| 14 #include "chrome/browser/policy/policy_bundle.h" | 14 #include "chrome/browser/policy/policy_bundle.h" |
| 15 #include "chrome/browser/policy/policy_map.h" | 15 #include "chrome/browser/policy/policy_map.h" |
| 16 #include "chrome/common/policy/policy_schema.h" | 16 #include "components/policy/core/common/policy_schema.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 namespace policy { | 19 namespace policy { |
| 20 | 20 |
| 21 class PolicyDomainDescriptorTest : public testing::Test { | 21 class PolicyDomainDescriptorTest : public testing::Test { |
| 22 protected: | 22 protected: |
| 23 scoped_ptr<ExternalDataFetcher> CreateExternalDataFetcher() const; | 23 scoped_ptr<ExternalDataFetcher> CreateExternalDataFetcher() const; |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 scoped_ptr<ExternalDataFetcher> | 26 scoped_ptr<ExternalDataFetcher> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 badmap.Set("Object", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 141 badmap.Set("Object", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
| 142 base::Value::CreateBooleanValue(false), NULL); | 142 base::Value::CreateBooleanValue(false), NULL); |
| 143 badmap.Set("String", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 143 badmap.Set("String", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
| 144 NULL, CreateExternalDataFetcher().release()); | 144 NULL, CreateExternalDataFetcher().release()); |
| 145 | 145 |
| 146 descriptor->FilterBundle(&bundle); | 146 descriptor->FilterBundle(&bundle); |
| 147 EXPECT_TRUE(bundle.Equals(empty_bundle)); | 147 EXPECT_TRUE(bundle.Equals(empty_bundle)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace policy | 150 } // namespace policy |
| OLD | NEW |