Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: components/policy/core/common/mac_util_unittest.cc

Issue 2817603003: Remove ListValue::Append(raw ptr) on Mac and iOS (Closed)
Patch Set: Comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/policy/core/common/mac_util.cc ('k') | components/wifi/fake_wifi_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/mac_util_unittest.cc
diff --git a/components/policy/core/common/mac_util_unittest.cc b/components/policy/core/common/mac_util_unittest.cc
index c25610b0a32ed14fb01f6bc13039e393df317d5f..00e53942c8ceda6eba41c4086f042cbc70152b9b 100644
--- a/components/policy/core/common/mac_util_unittest.cc
+++ b/components/policy/core/common/mac_util_unittest.cc
@@ -39,19 +39,19 @@ TEST(PolicyMacUtilTest, PropertyToValue) {
root.SetString("empty", "");
// base::Value::Type::LIST
+ root.Set("emptyl", base::MakeUnique<base::Value>(base::Value::Type::LIST));
base::ListValue list;
- root.Set("emptyl", list.DeepCopy());
for (base::DictionaryValue::Iterator it(root); !it.IsAtEnd(); it.Advance())
- list.Append(it.value().DeepCopy());
+ list.Append(base::MakeUnique<base::Value>(it.value()));
EXPECT_EQ(root.size(), list.GetSize());
- list.Append(root.DeepCopy());
- root.Set("list", list.DeepCopy());
+ list.Append(base::MakeUnique<base::Value>(root));
+ root.Set("list", base::MakeUnique<base::Value>(list));
// base::Value::Type::DICTIONARY
- base::DictionaryValue dict;
- root.Set("emptyd", dict.DeepCopy());
+ root.Set("emptyd",
+ base::MakeUnique<base::Value>(base::Value::Type::DICTIONARY));
// Very meta.
- root.Set("dict", root.DeepCopy());
+ root.Set("dict", base::MakeUnique<base::Value>(root));
base::ScopedCFTypeRef<CFPropertyListRef> property(ValueToProperty(root));
ASSERT_TRUE(property);
« no previous file with comments | « components/policy/core/common/mac_util.cc ('k') | components/wifi/fake_wifi_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698