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

Unified Diff: chrome/test/automation/automation_json_requests.cc

Issue 7055004: File upload API in chromedriver (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed a compile error. 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
Index: chrome/test/automation/automation_json_requests.cc
diff --git a/chrome/test/automation/automation_json_requests.cc b/chrome/test/automation/automation_json_requests.cc
index c05770b023341dc81068215efe1f080aa0522064..0c3b5ac14570c3916df50937ba3b517c1bdce32d 100644
--- a/chrome/test/automation/automation_json_requests.cc
+++ b/chrome/test/automation/automation_json_requests.cc
@@ -580,6 +580,31 @@ bool SendNativeKeyEventJSONRequest(
return SendAutomationJSONRequest(sender, dict, &reply_dict, error_msg);
}
+bool SendDragAndDropFilePathsJSONRequest(
+ AutomationMessageSender* sender,
+ int browser_index,
+ int tab_index,
+ int x,
+ int y,
+ const std::vector<std::string>& paths,
+ std::string* error_msg) {
+ DictionaryValue dict;
+ dict.SetString("command", "DragAndDropFilePaths");
+ dict.SetInteger("windex", browser_index);
+ dict.SetInteger("tab_index", tab_index);
+ dict.SetInteger("x", x);
+ dict.SetInteger("y", y);
+
+ ListValue* list_value = new ListValue();
+ for (size_t path_index = 0; path_index < paths.size(); ++path_index) {
+ list_value->Append(Value::CreateStringValue(paths[path_index]));
+ }
+ dict.Set("paths", list_value);
+
+ DictionaryValue reply_dict;
+ return SendAutomationJSONRequest(sender, dict, &reply_dict, error_msg);
+}
+
bool SendGetAppModalDialogMessageJSONRequest(
AutomationMessageSender* sender,
std::string* message,

Powered by Google App Engine
This is Rietveld 408576698