Index: base/values_unittest.cc |
diff --git a/base/values_unittest.cc b/base/values_unittest.cc |
index 0ca19d9d2b626b96b4ffb0f9f83008590c7ef430..553e8e15080a083712232ee45b21b077e6fb99de 100644 |
--- a/base/values_unittest.cc |
+++ b/base/values_unittest.cc |
@@ -416,20 +416,21 @@ TEST(ValuesTest, DeepCopy) { |
ASSERT_TRUE(copy_dict->Get("binary", ©_binary)); |
ASSERT_TRUE(copy_binary); |
ASSERT_NE(copy_binary, original_binary); |
- BinaryValue* binary_value = copy_binary->AsBinary(); |
- ASSERT_TRUE(binary_value); |
- ASSERT_NE(original_binary->GetBuffer(), binary_value->GetBuffer()); |
- ASSERT_EQ(original_binary->GetSize(), binary_value->GetSize()); |
+ ASSERT_TRUE(copy_binary->IsType(Value::TYPE_BINARY)); |
+ ASSERT_NE(original_binary->GetBuffer(), |
+ static_cast<BinaryValue*>(copy_binary)->GetBuffer()); |
+ ASSERT_EQ(original_binary->GetSize(), |
+ static_cast<BinaryValue*>(copy_binary)->GetSize()); |
ASSERT_EQ(0, memcmp(original_binary->GetBuffer(), |
- binary_value->GetBuffer(), |
- original_binary->GetSize())); |
+ static_cast<BinaryValue*>(copy_binary)->GetBuffer(), |
+ original_binary->GetSize())); |
Value* copy_value = NULL; |
ASSERT_TRUE(copy_dict->Get("list", ©_value)); |
ASSERT_TRUE(copy_value); |
ASSERT_NE(copy_value, original_list); |
- ListValue* copy_list = copy_value->AsList(); |
- ASSERT_TRUE(copy_list != NULL); |
+ ASSERT_TRUE(copy_value->IsType(Value::TYPE_LIST)); |
+ ListValue* copy_list = static_cast<ListValue*>(copy_value); |
ASSERT_EQ(2U, copy_list->GetSize()); |
Value* copy_list_element_0; |