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

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

Issue 10411031: Fixing loglevel in chrome driver to accept string rather than an integer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added OFF driver logging level. Created 8 years, 7 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
« no previous file with comments | « chrome/test/webdriver/webdriver_capabilities_parser.cc ('k') | chrome/test/webdriver/webdriver_logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/test/webdriver/webdriver_capabilities_parser.cc ('k') | chrome/test/webdriver/webdriver_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698