Index: chrome/test/base/ui_test_utils.cc |
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc |
index 5140b22a87a92c28bcbc17226d7157413ba1b6ef..b1ceedceb90937aabd17e0d3721a5de1c9a8cd5b 100644 |
--- a/chrome/test/base/ui_test_utils.cc |
+++ b/chrome/test/base/ui_test_utils.cc |
@@ -206,10 +206,10 @@ bool ExecuteJavaScriptHelper(RenderViewHost* render_view_host, |
json.append("]"); |
scoped_ptr<Value> root_val(base::JSONReader::Read(json, true)); |
- if (!root_val->IsType(Value::TYPE_LIST)) |
+ ListValue* list = root_val->AsList(); |
+ if (!list) |
return false; |
- ListValue* list = static_cast<ListValue*>(root_val.get()); |
Value* result_val; |
if (!list || !list->GetSize() || |
!list->Remove(0, &result_val)) // Remove gives us ownership of the value. |
@@ -956,9 +956,9 @@ class SnapshotTaker { |
// Parse the JSON. |
std::vector<int> dimensions; |
scoped_ptr<Value> value(base::JSONReader::Read(json, true)); |
- if (!value->IsType(Value::TYPE_LIST)) |
+ ListValue* list = value->AsList(); |
+ if (!list) |
return false; |
- ListValue* list = static_cast<ListValue*>(value.get()); |
int width, height; |
if (!list->GetInteger(0, &width) || !list->GetInteger(1, &height)) |
return false; |