| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/mac_util.h" | 5 #include "components/policy/core/common/mac_util.h" |
| 6 | 6 |
| 7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 EXPECT_EQ(root.size(), list.GetSize()); | 45 EXPECT_EQ(root.size(), list.GetSize()); |
| 46 list.Append(root.DeepCopy()); | 46 list.Append(root.DeepCopy()); |
| 47 root.Set("list", list.DeepCopy()); | 47 root.Set("list", list.DeepCopy()); |
| 48 | 48 |
| 49 // base::Value::TYPE_DICTIONARY | 49 // base::Value::TYPE_DICTIONARY |
| 50 base::DictionaryValue dict; | 50 base::DictionaryValue dict; |
| 51 root.Set("emptyd", dict.DeepCopy()); | 51 root.Set("emptyd", dict.DeepCopy()); |
| 52 // Very meta. | 52 // Very meta. |
| 53 root.Set("dict", root.DeepCopy()); | 53 root.Set("dict", root.DeepCopy()); |
| 54 | 54 |
| 55 base::ScopedCFTypeRef<CFPropertyListRef> property(ValueToProperty(&root)); | 55 base::ScopedCFTypeRef<CFPropertyListRef> property(ValueToProperty(root)); |
| 56 ASSERT_TRUE(property); | 56 ASSERT_TRUE(property); |
| 57 std::unique_ptr<base::Value> value = PropertyToValue(property); | 57 std::unique_ptr<base::Value> value = PropertyToValue(property); |
| 58 ASSERT_TRUE(value); | 58 ASSERT_TRUE(value); |
| 59 EXPECT_TRUE(root.Equals(value.get())); | 59 EXPECT_TRUE(root.Equals(value.get())); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace policy | 62 } // namespace policy |
| OLD | NEW |