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 "chrome/browser/policy/schema_map.h" | 5 #include "chrome/browser/policy/schema_map.h" |
6 | 6 |
7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/policy/external_data_fetcher.h" | |
10 #include "chrome/browser/policy/external_data_manager.h" | |
11 #include "chrome/browser/policy/policy_bundle.h" | 9 #include "chrome/browser/policy/policy_bundle.h" |
12 #include "chrome/browser/policy/policy_map.h" | 10 #include "components/policy/core/common/external_data_fetcher.h" |
| 11 #include "components/policy/core/common/external_data_manager.h" |
| 12 #include "components/policy/core/common/policy_map.h" |
13 #include "components/policy/core/common/schema.h" | 13 #include "components/policy/core/common/schema.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace policy { | 16 namespace policy { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const char kTestSchema[] = | 20 const char kTestSchema[] = |
21 "{" | 21 "{" |
22 " \"type\": \"object\"," | 22 " \"type\": \"object\"," |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 newer = new SchemaMap(map); | 304 newer = new SchemaMap(map); |
305 newer->GetChanges(older, &removed, &added); | 305 newer->GetChanges(older, &removed, &added); |
306 ASSERT_EQ(2u, removed.size()); | 306 ASSERT_EQ(2u, removed.size()); |
307 EXPECT_EQ(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), removed[0]); | 307 EXPECT_EQ(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), removed[0]); |
308 EXPECT_EQ(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"), removed[1]); | 308 EXPECT_EQ(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"), removed[1]); |
309 ASSERT_EQ(1u, added.size()); | 309 ASSERT_EQ(1u, added.size()); |
310 EXPECT_EQ(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "abc"), added[0]); | 310 EXPECT_EQ(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "abc"), added[0]); |
311 } | 311 } |
312 | 312 |
313 } // namespace policy | 313 } // namespace policy |
OLD | NEW |