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

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

Issue 5572001: Send screenshots back to the client for debugging (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed nit Created 9 years, 10 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/commands/response.cc
diff --git a/chrome/test/webdriver/commands/response.cc b/chrome/test/webdriver/commands/response.cc
index d25675472c4b27ad217114c5c336856c615c85d2..55a2ffe898cccd8b3a5ea3c80778341ef0a32361 100644
--- a/chrome/test/webdriver/commands/response.cc
+++ b/chrome/test/webdriver/commands/response.cc
@@ -53,13 +53,20 @@ void Response::SetValue(Value* value) {
data_.Set(kValueKey, value);
}
-void Response::SetError(ErrorCode error_code, const std::string& message,
- const std::string& file, int line) {
+void Response::SetError(ErrorCode error_code,
+ const std::string& message,
+ const std::string& file,
+ int line,
+ const std::string& screenshot) {
DictionaryValue* error = new DictionaryValue;
error->SetString(kMessageKey, message);
error->SetString(kStackTraceFileNameKey, file);
error->SetInteger(kStackTraceLineNumberKey, line);
+ if (!screenshot.empty()) {
+ error->SetString(kScreenKey, screenshot);
+ }
+
SetStatus(error_code);
SetValue(error);
}

Powered by Google App Engine
This is Rietveld 408576698