diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 16:08:13 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 16:08:13 +0000 |
commit | 86b3ea336404f6248e3d8b63be219c5ba100f9d4 (patch) | |
tree | 1d20d5fd67c851c4047d765ab30eafbc1d9a6ad6 | |
parent | b51bbb81bac3ce6a1ae84b0e781b87487b23cbb8 (diff) | |
download | chromium_src-86b3ea336404f6248e3d8b63be219c5ba100f9d4.zip chromium_src-86b3ea336404f6248e3d8b63be219c5ba100f9d4.tar.gz chromium_src-86b3ea336404f6248e3d8b63be219c5ba100f9d4.tar.bz2 |
Add automation proxy methods for sending InstallExtension message.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/595013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38621 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/automation/automation_proxy.cc | 7 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy.h | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index 6dd8032..55ebc08 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -220,6 +220,13 @@ bool AutomationProxy::SavePackageShouldPromptUser(bool should_prompt) { return Send(new AutomationMsg_SavePackageShouldPromptUser(0, should_prompt)); } +bool AutomationProxy::InstallExtension(const FilePath& crx_file) { + AutomationMsg_ExtensionResponseValues response; + if (!Send(new AutomationMsg_InstallExtension(0, crx_file, &response))) + return false; + return response == AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED; +} + bool AutomationProxy::GetBrowserWindowCount(int* num_windows) { if (!num_windows) { NOTREACHED(); diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h index 312c4b0..174dbb2 100644 --- a/chrome/test/automation/automation_proxy.h +++ b/chrome/test/automation/automation_proxy.h @@ -181,6 +181,11 @@ class AutomationProxy : public IPC::Channel::Listener, // sent. bool SavePackageShouldPromptUser(bool should_prompt); + // Installs the extension crx. Returns true only if extension was installed + // and loaded successfully. + // Note: Overinstalls will fail. + bool InstallExtension(const FilePath& crx_file); + // Returns the ID of the automation IPC channel, so that it can be // passed to the app as a launch parameter. const std::string& channel_id() const { return channel_id_; } |