diff options
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/content_settings_observer.cc | 1 | ||||
-rw-r--r-- | chrome/test/functional/PYAUTO_TESTS | 3 | ||||
-rw-r--r-- | chrome/test/functional/plugins.py | 18 |
4 files changed, 19 insertions, 11 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index b7b83ad..8fe6a40 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/bind.h" #include "base/command_line.h" #include "base/file_path.h" #include "base/json/json_reader.h" @@ -3288,6 +3289,13 @@ void TestingAutomationProvider::GetPluginsInfo( Browser* browser, DictionaryValue* args, IPC::Message* reply_message) { + if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { + BrowserThread::PostTask( + BrowserThread::FILE, FROM_HERE, + base::Bind(&TestingAutomationProvider::GetPluginsInfo, + this, browser, args, reply_message)); + return; + } std::vector<webkit::npapi::WebPluginInfo> plugins; webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins); ListValue* items = new ListValue; diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc index 1f9de9e..42ebb07 100644 --- a/chrome/renderer/content_settings_observer.cc +++ b/chrome/renderer/content_settings_observer.cc @@ -118,6 +118,7 @@ void ContentSettingsObserver::DidCommitProvisionalLoad( // so that these functions can correctly detect that a piece of content // flipped from "not blocked" to "blocked". ClearBlockedContentSettings(); + plugins_temporarily_allowed_ = false; GURL url = frame->url(); diff --git a/chrome/test/functional/PYAUTO_TESTS b/chrome/test/functional/PYAUTO_TESTS index 758b478..e8230c6 100644 --- a/chrome/test/functional/PYAUTO_TESTS +++ b/chrome/test/functional/PYAUTO_TESTS @@ -96,9 +96,6 @@ # crbug.com/83459 '-instant.InstantTest.testPreFetchInstantURLSetsNoCookies', '-omnibox.OmniboxTest.testHistoryResult', # crbug.com/71715 - # crbug.com/85307 - '-plugins.PluginsTest.testDisableEnableAllPlugins', - '-plugins.PluginsTest.testKillAndReloadAllPlugins', # crbug.com/82629 - real bug. '-popups.PopupsTest.testPopupsLaunchUponBrowserBackButton', # crbug.com/47935 diff --git a/chrome/test/functional/plugins.py b/chrome/test/functional/plugins.py index 3ec84ef..166495d 100644 --- a/chrome/test/functional/plugins.py +++ b/chrome/test/functional/plugins.py @@ -98,19 +98,21 @@ class PluginsTest(pyauto.PyUITest): if re.search(plugin_name, plugin['name']): return plugin['enabled'] + def _PluginNeedsAuthorization(self, plugin_name): + # These plug-ins seek permission to run + return plugin_name in ['Java', 'Quicktime', 'Windows Media'] + def testKillAndReloadAllPlugins(self): """Verify plugin processes and check if they can reload after killing.""" for fname, plugin_name in self._ObtainPluginsList(): if plugin_name == 'Shockwave Flash': continue # cannot reload file:// flash URL - crbug.com/47249 - if plugin_name == 'Java': # crbug.com/71223 - continue url = self.GetFileURLForPath( os.path.join(self.DataDir(), 'plugin', fname)) self.NavigateToURL(url) - # All other plugins seek permission to run - self.assertTrue(self.WaitForInfobarCount(1)) - self.PerformActionOnInfobar('accept', 0) + if self._PluginNeedsAuthorization(plugin_name): + self.assertTrue(self.WaitForInfobarCount(1)) + self.PerformActionOnInfobar('accept', 0) self.WaitUntil( lambda: self._GetPluginPID(plugin_name) is not None ) pid = self._GetPluginPID(plugin_name) @@ -154,9 +156,9 @@ class PluginsTest(pyauto.PyUITest): # Enable self._TogglePlugin(plugin_name) self.GetBrowserWindow(0).GetTab(0).Reload() - # All other plugins seek permission to run - self.assertTrue(self.WaitForInfobarCount(1)) - self.PerformActionOnInfobar('accept', 0) + if self._PluginNeedsAuthorization(plugin_name): + self.assertTrue(self.WaitForInfobarCount(1)) + self.PerformActionOnInfobar('accept', 0) self.assertTrue(self.WaitUntil( lambda: self._GetPluginPID(plugin_name=plugin_name))) self.assertTrue(self._IsEnabled(plugin_name), plugin_name) |