Index: chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc |
diff --git a/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc b/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc |
index 085c0b9e2fe98ab3344d1d1d213b296514de30a9..0f01d790d1ed9d6be7cf412fa7144b39335da6e3 100644 |
--- a/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc |
+++ b/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc |
@@ -259,4 +259,23 @@ TEST(CapabilitiesParser, ProxyFtpServerCapNullValue) { |
caps.command.GetSwitchValueASCII(switches::kProxyServer).c_str()); |
} |
+// To demonstrate a bug (described: |
+// http://code.google.com/p/chromedriver/issues/detail?id=75), |
+// namely, that the driver logging preference should be of type Level, not |
+// integer |
+// (http://code.google.com/p/selenium/wiki/DesiredCapabilities#JSON_object) |
+TEST(CapabilitiesParser, DriverLoggingCapString) { |
+ Capabilities caps; |
+ DictionaryValue dict; |
+ DictionaryValue* options = new DictionaryValue(); |
+ dict.Set("loggingPrefs", options); |
+ CapabilitiesParser parser(&dict, FilePath(), Logger(), &caps); |
+ |
+ options->SetString("driver", "INFO"); |
+ ASSERT_FALSE(parser.Parse()); |
kkania
2012/05/21 17:46:46
i guess you wrote this test to demonstrate the bug
zori
2012/05/21 23:42:33
Since CapabilitiesParser::Parse() returns Error*,
|
+ |
+ options->SetInteger("driver", kInfoLogLevel); |
kkania
2012/05/21 17:46:46
although people forget to all the time, technicall
zori
2012/05/21 23:42:33
I knew this, sorry. Done.
On 2012/05/21 17:46:46,
|
+ ASSERT_TRUE(parser.Parse()); |
+} |
+ |
} // namespace webdriver |