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

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

Issue 8341044: Enhance and refactor ChromeDriver's capability handling. Log warning for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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_util.cc
diff --git a/chrome/test/webdriver/webdriver_util.cc b/chrome/test/webdriver/webdriver_util.cc
index 45e080f378877a307f30559fc5ff90e609ecd48e..b1789dac3f22f7e8cb66b382543377bf8215859c 100644
--- a/chrome/test/webdriver/webdriver_util.cc
+++ b/chrome/test/webdriver/webdriver_util.cc
@@ -9,7 +9,8 @@
#include "base/json/json_writer.h"
#include "base/rand_util.h"
#include "base/stringprintf.h"
-#include "base/values.h"
+
+using base::Value;
namespace webdriver {
@@ -27,6 +28,28 @@ std::string JsonStringify(const Value* value) {
return json;
}
+const char* GetJsonTypeName(Value::Type type) {
+ switch (type) {
+ case Value::TYPE_NULL:
+ return "null";
+ case Value::TYPE_BOOLEAN:
+ return "boolean";
+ case Value::TYPE_INTEGER:
+ return "integer";
+ case Value::TYPE_DOUBLE:
+ return "double";
+ case Value::TYPE_STRING:
+ return "string";
+ case Value::TYPE_BINARY:
+ return "binary";
+ case Value::TYPE_DICTIONARY:
+ return "dictionary";
+ case Value::TYPE_LIST:
+ return "list";
+ }
+ return "unknown";
+}
+
ValueParser::ValueParser() { }
ValueParser::~ValueParser() { }

Powered by Google App Engine
This is Rietveld 408576698