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 a6c01fac498f34601dd5209ead263dd733c45235..78de5bdd5dba4b86b0841e02924a9af186e901f1 100644 |
--- a/chrome/test/automation/automation_json_requests.cc |
+++ b/chrome/test/automation/automation_json_requests.cc |
@@ -575,6 +575,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<FilePath::StringType>& 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, |