diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 12:28:22 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 12:28:22 +0000 |
commit | 4da06efd6d467e07ac311a59e5f79bd0cc6145d4 (patch) | |
tree | 711d378acbaa00035c56f2f6af82f09e3a301d71 /chrome/browser/automation | |
parent | 506398ae0dcffa9677ba4c08fd27ce4cf141426d (diff) | |
download | chromium_src-4da06efd6d467e07ac311a59e5f79bd0cc6145d4.zip chromium_src-4da06efd6d467e07ac311a59e5f79bd0cc6145d4.tar.gz chromium_src-4da06efd6d467e07ac311a59e5f79bd0cc6145d4.tar.bz2 |
Add UI test for click-to-play.
BUG=57277
TEST=NPAPIVisiblePluginTester.ClickToPlay:ClickToPlayPluginTest.*
Review URL: http://codereview.chromium.org/3539002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.cc | 16 | ||||
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.h | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 109c13b..e4e1d53 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -419,6 +419,7 @@ void TestingAutomationProvider::OnMessageReceived( IPC_MESSAGE_HANDLER(AutomationMsg_ShutdownSessionService, ShutdownSessionService) IPC_MESSAGE_HANDLER(AutomationMsg_SetContentSetting, SetContentSetting) + IPC_MESSAGE_HANDLER(AutomationMsg_LoadBlockedPlugins, LoadBlockedPlugins) IPC_MESSAGE_HANDLER(AutomationMsg_ResetToDefaultTheme, ResetToDefaultTheme) IPC_MESSAGE_UNHANDLED(AutomationProvider::OnMessageReceived(message)); @@ -4052,6 +4053,21 @@ void TestingAutomationProvider::SetContentSetting( } } +void TestingAutomationProvider::LoadBlockedPlugins(int tab_handle, + bool* success) { + *success = false; + if (tab_tracker_->ContainsHandle(tab_handle)) { + NavigationController* nav = tab_tracker_->GetResource(tab_handle); + if (!nav) + return; + TabContents* contents = nav->tab_contents(); + if (!contents) + return; + contents->render_view_host()->LoadBlockedPlugins(); + *success = true; + } +} + void TestingAutomationProvider::ResetToDefaultTheme() { profile_->ClearTheme(); } diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index 838a079..7f82ea5 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -656,6 +656,9 @@ class TestingAutomationProvider : public AutomationProvider, ContentSetting setting, bool* success); + // Load all plug-ins on the page. + void LoadBlockedPlugins(int tab_handle, bool* success); + // Resets to the default theme. void ResetToDefaultTheme(); |