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

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: added tests which compare against a reference md5 hash 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
Index: chrome/test/webdriver/server.cc
diff --git a/chrome/test/webdriver/server.cc b/chrome/test/webdriver/server.cc
index fede21277e4574accaffa710f07617fda122a74a..bb643cd737aa3dd51c7dea2e9488bbef38ef2a86 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"
@@ -119,6 +120,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");
@@ -128,7 +131,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.
@@ -156,6 +158,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.

Powered by Google App Engine
This is Rietveld 408576698