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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 7753020: Revert recent changes to base::Value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/test/automation/value_conversion_traits.cc ('k') | chrome/test/perf/dom_checker_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2234ba2f7881d7acbaca340c360bb7352f1df320..d087e684f68a36fb68c13b12088adbded4961c0b 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));
- ListValue* list = root_val->AsList();
- if (!list)
+ if (!root_val->IsType(Value::TYPE_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.
@@ -925,9 +925,9 @@ class SnapshotTaker {
// Parse the JSON.
std::vector<int> dimensions;
scoped_ptr<Value> value(base::JSONReader::Read(json, true));
- ListValue* list = value->AsList();
- if (!list)
+ if (!value->IsType(Value::TYPE_LIST))
return false;
+ ListValue* list = static_cast<ListValue*>(value.get());
int width, height;
if (!list->GetInteger(0, &width) || !list->GetInteger(1, &height))
return false;
« no previous file with comments | « chrome/test/automation/value_conversion_traits.cc ('k') | chrome/test/perf/dom_checker_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698