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

Unified Diff: chrome/common/json_value_serializer_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: chrome/common/json_value_serializer_unittest.cc
diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc
index 541ac8c130c5d8e1aa18b01a04f6c040e9a59d78..94064344d025c96301cdf3303f6704ddd0e3f118 100644
--- a/chrome/common/json_value_serializer_unittest.cc
+++ b/chrome/common/json_value_serializer_unittest.cc
@@ -195,7 +195,7 @@ namespace {
void ValidateJsonList(const std::string& json) {
scoped_ptr<Value> root(base::JSONReader::Read(json, false));
- ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST));
+ ASSERT_TRUE(root.get() && root->AsList());
ListValue* list = static_cast<ListValue*>(root.get());
Evan Martin 2011/08/23 18:15:26 ASSERT_TRUE(root.get()); ListValue* list = root->A
tfarina 2011/08/23 18:26:36 Done.
ASSERT_EQ(1U, list->GetSize());
Value* elt = NULL;
@@ -219,7 +219,7 @@ TEST(JSONValueSerializerTest, JSONReaderComments) {
// It's ok to have a comment in a string.
root.reset(base::JSONReader::Read("[\"// ok\\n /* foo */ \"]", false));
- ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST));
+ ASSERT_TRUE(root.get() && root->AsList());
ListValue* list = static_cast<ListValue*>(root.get());
ASSERT_EQ(1U, list->GetSize());
Value* elt = NULL;

Powered by Google App Engine
This is Rietveld 408576698