Chromium Code Reviews| Index: chrome/test/chromedriver/capabilities.cc |
| =================================================================== |
| --- chrome/test/chromedriver/capabilities.cc (revision 194587) |
| +++ chrome/test/chromedriver/capabilities.cc (working copy) |
| @@ -12,6 +12,7 @@ |
| #include "base/stringprintf.h" |
| #include "base/values.h" |
| #include "chrome/test/chromedriver/chrome/status.h" |
| +#include "chrome/test/chromedriver/logging.h" |
|
kkania
2013/04/18 20:27:55
you can drop this now
klm
2013/04/18 22:53:34
Done.
|
| namespace { |
| @@ -201,6 +202,17 @@ |
| return Status(kOk); |
| } |
| +Status ParseLoggingPrefs(const base::Value& option, |
| + Capabilities* capabilities) { |
| + const base::DictionaryValue* logging_prefs; |
| + if (!option.GetAsDictionary(&logging_prefs)) |
| + return Status(kUnknownError, "'loggingPrefs' must be a dictionary"); |
| + // TODO(klm): verify log types. |
| + // TODO(klm): verify log levels. |
| + capabilities->logging_prefs.reset(logging_prefs->DeepCopy()); |
| + return Status(kOk); |
| +} |
| + |
| } // namespace |
| Capabilities::Capabilities() : command(CommandLine::NO_PROGRAM) {} |
| @@ -221,6 +233,7 @@ |
| std::map<std::string, Parser> parser_map; |
| parser_map["proxy"] = base::Bind(&ParseProxy); |
| parser_map["chromeOptions"] = base::Bind(&ParseDesktopChromeOption); |
| + parser_map["loggingPrefs"] = base::Bind(&ParseLoggingPrefs); |
|
klm
2013/04/18 22:53:34
Notice how I changed the way I parse logging prefs
|
| for (std::map<std::string, Parser>::iterator it = parser_map.begin(); |
| it != parser_map.end(); ++it) { |
| const base::Value* capability = NULL; |