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() { } |