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

Unified Diff: chrome/test/webdriver/dispatch.h

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/commands/webdriver_command.cc ('k') | chrome/test/webdriver/dispatch.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/dispatch.h
diff --git a/chrome/test/webdriver/dispatch.h b/chrome/test/webdriver/dispatch.h
index 5d86a525262a5f28c829575c8419ff3387f3858b..b3d2fd066886005ba40ac0f53cd5fcfb907e90af 100644
--- a/chrome/test/webdriver/dispatch.h
+++ b/chrome/test/webdriver/dispatch.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/logging.h"
#include "chrome/test/webdriver/commands/response.h"
#include "third_party/mongoose/mongoose.h"
@@ -68,15 +69,19 @@ void Dispatch(struct mg_connection* connection,
&path_segments,
&parameters,
&response)) {
+ std::string post_data(request_info->post_data, request_info->post_data_len);
+ LOG(INFO) << "Received command, url: " << request_info->uri
+ << ", method: " << request_info->request_method
+ << ", postd data: " << post_data;
internal::DispatchHelper(
new CommandType(path_segments, parameters),
method,
&response);
}
-
internal::SendResponse(connection,
request_info->request_method,
response);
+ LOG(INFO) << "Sent command response, url: " << request_info->uri;
}
class Dispatcher {
@@ -100,7 +105,11 @@ class Dispatcher {
// Registers a callback for the given pattern that will return a simple
// "HTTP/1.1 200 OK" message with "ok" in the body. Used for checking the
// status of the server.
- void AddStatus(const std::string& pattern);
+ void AddHealthz(const std::string& pattern);
+
+ // Registers a callback for the given pattern that will return the current
+ // WebDriver log contents.
+ void AddLog(const std::string& pattern);
// Registers a callback that will always respond with a
// "HTTP/1.1 501 Not Implemented" message.
« no previous file with comments | « chrome/test/webdriver/commands/webdriver_command.cc ('k') | chrome/test/webdriver/dispatch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698