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

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

Issue 5572001: Send screenshots back to the client for debugging (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: need to push again to make sure rietveld didn't screw up Created 9 years, 9 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.h ('k') | chrome/test/webdriver/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/server.cc
diff --git a/chrome/test/webdriver/server.cc b/chrome/test/webdriver/server.cc
index 2c5d934ad9b8ed868d01638d0d6dfdf23a0d9b27..22711f5d51ecc59236793e79a9d6fa9edacbb719 100644
--- a/chrome/test/webdriver/server.cc
+++ b/chrome/test/webdriver/server.cc
@@ -37,6 +37,7 @@
#include "chrome/test/webdriver/commands/implicit_wait_command.h"
#include "chrome/test/webdriver/commands/navigate_commands.h"
#include "chrome/test/webdriver/commands/mouse_commands.h"
+#include "chrome/test/webdriver/commands/screenshot_command.h"
#include "chrome/test/webdriver/commands/session_with_id.h"
#include "chrome/test/webdriver/commands/source_command.h"
#include "chrome/test/webdriver/commands/speed_command.h"
@@ -102,6 +103,8 @@ void InitCallbacks(struct mg_context* ctx, Dispatcher* dispatcher,
dispatcher->Add<ElementToggleCommand>( "/session/*/element/*/toggle");
dispatcher->Add<ElementValueCommand>( "/session/*/element/*/value");
+ dispatcher->Add<ScreenshotCommand>("/session/*/screenshot");
+
// Mouse Commands
dispatcher->Add<ClickCommand>("/session/*/element/*/click");
dispatcher->Add<DragCommand>( "/session/*/element/*/drag");
@@ -135,7 +138,6 @@ void InitCallbacks(struct mg_context* ctx, Dispatcher* dispatcher,
// so that tests that attempt to use them fail with a meaningful error.
dispatcher->SetNotImplemented("/session/*/execute_async");
dispatcher->SetNotImplemented("/session/*/timeouts/async_script");
- dispatcher->SetNotImplemented("/session/*/screenshot");
// Since the /session/* is a wild card that would match the above URIs, this
// line MUST be the last registered URI with the server.
@@ -163,6 +165,7 @@ bool SetMongooseOptions(struct mg_context* ctx,
return true;
}
+
// Sets up and runs the Mongoose HTTP server for the JSON over HTTP
// protcol of webdriver. The spec is located at:
// http://code.google.com/p/selenium/wiki/JsonWireProtocol.
« no previous file with comments | « chrome/test/webdriver/commands/webdriver_command.h ('k') | chrome/test/webdriver/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698