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

Unified Diff: base/values_unittest.cc

Issue 7714004: base: Add AsList() function to Value API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE Created 9 years, 4 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
Index: base/values_unittest.cc
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 553e8e15080a083712232ee45b21b077e6fb99de..c8d3e3ca11d6429731a3c5b718a73bfe27911122 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -429,8 +429,8 @@ TEST(ValuesTest, DeepCopy) {
ASSERT_TRUE(copy_dict->Get("list", &copy_value));
ASSERT_TRUE(copy_value);
ASSERT_NE(copy_value, original_list);
- ASSERT_TRUE(copy_value->IsType(Value::TYPE_LIST));
- ListValue* copy_list = static_cast<ListValue*>(copy_value);
+ ListValue* copy_list = copy_value->AsList();
+ ASSERT_TRUE(copy_list != NULL);
ASSERT_EQ(2U, copy_list->GetSize());
Value* copy_list_element_0;

Powered by Google App Engine
This is Rietveld 408576698