diff options
author | sunandt@chromium.org <sunandt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-20 21:48:49 +0000 |
---|---|---|
committer | sunandt@chromium.org <sunandt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-20 21:48:49 +0000 |
commit | 1dd8d95cc9be7326bd28ae516f176ec21e4f6b7c (patch) | |
tree | 4325939db90d58edbc3ebf2c45b1f9510e489ad5 /chrome/test | |
parent | e03877283adbc051136a08fac7cff567d0eb247c (diff) | |
download | chromium_src-1dd8d95cc9be7326bd28ae516f176ec21e4f6b7c.zip chromium_src-1dd8d95cc9be7326bd28ae516f176ec21e4f6b7c.tar.gz chromium_src-1dd8d95cc9be7326bd28ae516f176ec21e4f6b7c.tar.bz2 |
Fixing pyauto plugins test
Fixing test testBlockPluginException
Sometimes we fail to retrieve the shockwave flash process id.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6260015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/functional/plugins.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/test/functional/plugins.py b/chrome/test/functional/plugins.py index ee00fe4..1189865 100644 --- a/chrome/test/functional/plugins.py +++ b/chrome/test/functional/plugins.py @@ -192,19 +192,21 @@ class PluginsTest(pyauto.PyUITest): # setting 1 min of wait time here. test_utils.CallFunctionWithNewTimeout(self, 1 * 60 * 1000, lambda: self.NavigateToURL('http://vimeo.com')) - pid = self._GetPluginPID('Shockwave Flash') - self.assertTrue(pid, msg='No plugin process for Shockwave Flash') - self.Kill(pid) + # Wait until Shockwave Flash plugin process loads. + self.assertTrue(self.WaitUntil( + lambda: self._GetPluginPID('Shockwave Flash') is not None), + msg='No plugin process for Shockwave Flash') + self.Kill(self._GetPluginPID('Shockwave Flash')) self.assertTrue(self.WaitUntil( lambda: self._GetPluginPID('Shockwave Flash') is None), msg='Expected Shockwave Flash plugin to die after killing') - # Add an exception to block plugins on hulu.com. + # Add an exception to block plugins on vimeo.com. self.SetPrefs(pyauto.kContentSettingsPatterns, {'[*.]vimeo.com': {'plugins': 2}}) self.GetBrowserWindow(0).GetTab(0).Reload() self.assertFalse(self._GetPluginPID('Shockwave Flash'), - msg='Plug-in not blocked.') + msg='Shockwave Flash Plug-in not blocked.') if __name__ == '__main__': |