| Index: chrome/browser/automation/testing_automation_provider.cc
|
| diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
|
| index 9b6c30356a35220e7a35b72d954620f6474f1028..202b9b5bbde4b2e018edd6090ae6514a05aac192 100644
|
| --- a/chrome/browser/automation/testing_automation_provider.cc
|
| +++ b/chrome/browser/automation/testing_automation_provider.cc
|
| @@ -4,6 +4,10 @@
|
|
|
| #include "chrome/browser/automation/testing_automation_provider.h"
|
|
|
| +#include <map>
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| #include "app/message_box_flags.h"
|
| #include "base/command_line.h"
|
| #include "base/json/json_reader.h"
|
| @@ -2591,7 +2595,7 @@ DownloadItem* GetDownloadItemFromId(int id, DownloadManager* download_manager) {
|
| return selected_item;
|
| }
|
|
|
| -} // namespace
|
| +} // namespace
|
|
|
| // See PerformActionOnDownload() in chrome/test/pyautolib/pyauto.py for sample
|
| // json input and output.
|
| @@ -2980,7 +2984,7 @@ void TestingAutomationProvider::GetPluginsInfo(
|
| item->SetString("path", it->path.value());
|
| item->SetString("version", it->version);
|
| item->SetString("desc", it->desc);
|
| - item->SetBoolean("enabled", it->enabled);
|
| + item->SetBoolean("enabled", webkit::npapi::IsPluginEnabled(*it));
|
| // Add info about mime types.
|
| ListValue* mime_types = new ListValue();
|
| for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it =
|
| @@ -3018,12 +3022,13 @@ void TestingAutomationProvider::EnablePlugin(Browser* browser,
|
| DictionaryValue* args,
|
| IPC::Message* reply_message) {
|
| FilePath::StringType path;
|
| + string16 name;
|
| AutomationJSONReply reply(this, reply_message);
|
| if (!args->GetString("path", &path)) {
|
| - reply.SendError("path not specified.");
|
| + reply.SendError("path or name not specified.");
|
| return;
|
| } else if (!webkit::npapi::PluginList::Singleton()->EnablePlugin(
|
| - FilePath(path))) {
|
| + FilePath(path))) {
|
| reply.SendError(StringPrintf("Could not enable plugin for path %s.",
|
| path.c_str()));
|
| return;
|
| @@ -3038,12 +3043,13 @@ void TestingAutomationProvider::DisablePlugin(Browser* browser,
|
| DictionaryValue* args,
|
| IPC::Message* reply_message) {
|
| FilePath::StringType path;
|
| + string16 name;
|
| AutomationJSONReply reply(this, reply_message);
|
| if (!args->GetString("path", &path)) {
|
| - reply.SendError("path not specified.");
|
| + reply.SendError("path or name not specified.");
|
| return;
|
| } else if (!webkit::npapi::PluginList::Singleton()->DisablePlugin(
|
| - FilePath(path))) {
|
| + FilePath(path))) {
|
| reply.SendError(StringPrintf("Could not disable plugin for path %s.",
|
| path.c_str()));
|
| return;
|
| @@ -3198,7 +3204,7 @@ webkit_glue::PasswordForm GetPasswordFormFromDict(
|
| return password_form;
|
| }
|
|
|
| -} // namespace
|
| +} // namespace
|
|
|
| // See AddSavedPassword() in chrome/test/functional/pyauto.py for sample json
|
| // input.
|
|
|