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

Unified Diff: chrome/test/webdriver/webdriver_session.cc

Issue 7714004: base: Add AsList() function to Value API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more poor const_casts 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/test/webdriver/webdriver_session.cc
diff --git a/chrome/test/webdriver/webdriver_session.cc b/chrome/test/webdriver/webdriver_session.cc
index 1a764a845f78678d4e2e617c302fe26f80c0e87a..c3a7c11ef2bbb64fdc1d57f722c338a43611bfef 100644
--- a/chrome/test/webdriver/webdriver_session.cc
+++ b/chrome/test/webdriver/webdriver_session.cc
@@ -1240,9 +1240,9 @@ Error* Session::ExecuteFindElementScriptAndParse(
virtual ~FindElementsParser() { }
virtual bool Parse(base::Value* value) const OVERRIDE {
- if (!value->IsType(Value::TYPE_LIST))
+ ListValue* list = value->AsList();
+ if (!list)
return false;
- ListValue* list = static_cast<ListValue*>(value);
for (size_t i = 0; i < list->GetSize(); ++i) {
ElementId element;
Value* element_value = NULL;

Powered by Google App Engine
This is Rietveld 408576698