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..f2e387e91ea5eec4600c170a852dfaf86296050b 100644 |
--- a/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc |
+++ b/chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc |
@@ -10,6 +10,7 @@ |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/zip.h" |
#include "chrome/test/webdriver/webdriver_capabilities_parser.h" |
+#include "chrome/test/webdriver/webdriver_logging.h" |
#include "testing/gtest/include/gtest/gtest.h" |
using base::DictionaryValue; |
@@ -259,4 +260,20 @@ TEST(CapabilitiesParser, ProxyFtpServerCapNullValue) { |
caps.command.GetSwitchValueASCII(switches::kProxyServer).c_str()); |
} |
+TEST(CapabilitiesParser, DriverLoggingCapString) { |
+ Capabilities caps; |
+ DictionaryValue dict; |
+ DictionaryValue* options = new DictionaryValue(); |
+ dict.Set("loggingPrefs", options); |
+ CapabilitiesParser parser(&dict, FilePath(), Logger(), &caps); |
+ |
+ // A string as the driver logging level works. |
+ options->SetString("driver", "INFO"); |
+ ASSERT_FALSE(parser.Parse()); |
+ |
+ // An integer (here, an enum LogLevel value) doesn't work. |
+ options->SetInteger("driver", kInfoLogLevel); |
+ ASSERT_TRUE(parser.Parse()); |
+} |
+ |
} // namespace webdriver |