diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py @@ -500,10 +500,13 @@ print >> sys.stderr, "certutil-binary argument missing or not a valid executable" sys.exit(1) kwargs["certutil_binary"] = path if kwargs['extra_prefs']: + # If a single pref is passed in as a string, make it a list + if type(kwargs['extra_prefs']) in (str, unicode): + kwargs['extra_prefs'] = [kwargs['extra_prefs']] missing = any('=' not in prefarg for prefarg in kwargs['extra_prefs']) if missing: print >> sys.stderr, "Preferences via --setpref must be in key=value format" sys.exit(1) kwargs['extra_prefs'] = [tuple(prefarg.split('=', 1)) for prefarg in