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

Unified Diff: chrome/test/webdriver/commands/create_session.cc

Issue 7139001: In chromedriver, add /log url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 6 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/chromedriver_tests.py ('k') | chrome/test/webdriver/commands/webdriver_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/commands/create_session.cc
diff --git a/chrome/test/webdriver/commands/create_session.cc b/chrome/test/webdriver/commands/create_session.cc
index a4eb304b54416b56f1e97ed62f8dee161e99d00a..6eeceab072cba11c74513a0052ce0b35ad72f43d 100644
--- a/chrome/test/webdriver/commands/create_session.cc
+++ b/chrome/test/webdriver/commands/create_session.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/file_path.h"
+#include "base/logging.h"
#include "base/stringprintf.h"
#include "base/values.h"
#include "chrome/app/chrome_command_ids.h"
@@ -68,6 +69,20 @@ void CreateSession::ExecutePost(Response* const response) {
kBadRequest, "Custom switches must be a list"));
return;
}
+ Value* verbose_value;
+ if (capabilities->GetWithoutPathExpansion("chrome.verbose", &verbose_value)) {
+ bool verbose;
+ if (verbose_value->GetAsBoolean(&verbose) && verbose) {
+ // Since logging is shared among sessions, if any session requests verbose
+ // logging, verbose logging will be enabled for all sessions. It is not
+ // possible to turn it off.
+ logging::SetMinLogLevel(logging::LOG_INFO);
+ } else {
+ response->SetError(new Error(
+ kBadRequest, "verbose must be a boolean true or false"));
+ return;
+ }
+ }
FilePath browser_exe;
FilePath::StringType path;
@@ -96,7 +111,7 @@ void CreateSession::ExecutePost(Response* const response) {
session->set_screenshot_on_error(screenshot_on_error);
}
- VLOG(1) << "Created session " << session->id();
+ LOG(INFO) << "Created session " << session->id();
std::ostringstream stream;
SessionManager* session_manager = SessionManager::GetInstance();
stream << "http://" << session_manager->GetAddress() << "/session/"
« no previous file with comments | « chrome/test/webdriver/chromedriver_tests.py ('k') | chrome/test/webdriver/commands/webdriver_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698