Chromium Code Reviews| 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 b6796913eadabe5ca9683c3f339f2c9e5ee9369b..3e3323b982dee5da975e87d7a37d399997eb5360 100644 |
| --- a/chrome/test/automation/automation_json_requests.cc |
| +++ b/chrome/test/automation/automation_json_requests.cc |
| @@ -549,6 +549,32 @@ bool SendNativeKeyEventJSONRequest( |
| return SendAutomationJSONRequest(sender, dict, &reply_dict, error_msg); |
| } |
| +bool SendSetFilePathsToFileUploadControlJSONRequest( |
| + 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", "SetFilePathToFileUploadControl"); |
| + 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) { |
| + const std::string& path = paths[path_index]; |
|
kkania
2011/05/23 18:43:49
merge this and the next line
nodchip
2011/05/26 01:14:53
Done.
|
| + list_value->Append(Value::CreateStringValue(path)); |
| + } |
| + dict.Set("paths", list_value); |
| + |
| + DictionaryValue reply_dict; |
| + return SendAutomationJSONRequest(sender, dict, &reply_dict, error_msg); |
| +} |
| + |
| bool SendGetAppModalDialogMessageJSONRequest( |
| AutomationMessageSender* sender, |
| std::string* message, |