Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: functional/plugins_check.py

Issue 6523003: Separating plugins test for individual platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « data/win_plugins_list.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: functional/plugins_check.py
===================================================================
--- functional/plugins_check.py (revision 74832)
+++ functional/plugins_check.py (working copy)
@@ -14,7 +14,7 @@
class PluginsCheck(pyauto.PyUITest):
"""TestCase for Plugins."""
- def _ReadPluginsList(self):
+ def _ReadPluginsList(self, plugins_list_file):
"""Read test plugins list from a file based on the test platform
File contains list of plugins like,
@@ -24,24 +24,25 @@
...
]
"""
- file_path = os.path.join(self.DataDir(), 'plugins_list.txt')
+ file_path = os.path.join(self.DataDir(), plugins_list_file)
return self.EvalDataFrom(file_path)
def testPluginsStates(self):
"""Verify plugins' versions and states."""
- if self.IsLinux():
+ if self.IsWin():
+ plugins_list = self._ReadPluginsList('win_plugins_list.txt')
+ elif self.IsMac():
+ plugins_list = self._ReadPluginsList('mac_plugins_list.txt')
+ elif self.IsLinux():
# TODO(rohitbm)
# Add plugins_check support for Linux
logging.debug('Not performing plugins check on linux')
return
+
browser_plugins_list = self.GetPluginsInfo().Plugins()
- version_sep = '.'
- if self.IsWin():
- # Windows flash plugin version uses |,| instead of |.|
- version_sep = ','
- for plugin in self._ReadPluginsList():
+ for plugin in plugins_list:
test_plugin = [x['name'] for x in browser_plugins_list \
- if x['version'] == plugin['version'].replace('.', version_sep) and \
+ if x['version'] == plugin['version'] and \
str(x['enabled']) == plugin['enabled'] and \
x['name'] == plugin['name']]
plugin_info = '[ NAME : %s, VERSION: %s, ENABLED: %s]' % \
« no previous file with comments | « data/win_plugins_list.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698