Bug 1258003 - Raise ValueError if video_urls empty; r=maja_zf
authorAnjana Vakil <anjanavakil@gmail.com>
Mon, 21 Mar 2016 11:56:38 +0100
changeset 289673 3c4c381012154ce012797db32d312d420cdda50a
parent 289672 d1cd0639aa524dd2f04a3111e4a4e051af4a39c7
child 289674 4e844efafd5d8ccf1cf1b891503555901185d9d7
push id30108
push usercbook@mozilla.com
push dateTue, 22 Mar 2016 11:14:31 +0000
treeherdermozilla-central@ea6298e1b4f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1258003
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1258003 - Raise ValueError if video_urls empty; r=maja_zf MozReview-Commit-ID: 6YP65VWfGRA
dom/media/test/external/external_media_harness/runtests.py
--- a/dom/media/test/external/external_media_harness/runtests.py
+++ b/dom/media/test/external/external_media_harness/runtests.py
@@ -22,25 +22,27 @@ class MediaTestArgumentsBase(object):
         [['--urls'], {
             'help': 'ini file of urls to make available to all tests',
             'default': os.path.join(external_media_tests.urls, 'default.ini'),
         }],
     ]
 
     def verify_usage_handler(self, args):
         if args.urls:
-           if not os.path.isfile(args.urls):
-               raise ValueError('--urls must provide a path to an ini file')
-           else:
-               path = os.path.abspath(args.urls)
-               args.video_urls = MediaTestArgumentsBase.get_urls(path)
+            if not os.path.isfile(args.urls):
+                raise ValueError('--urls must provide a path to an ini file')
+            else:
+                path = os.path.abspath(args.urls)
+                args.video_urls = MediaTestArgumentsBase.get_urls(path)
+                if not args.video_urls:
+                    raise ValueError('list of video URLs cannot be empty')
 
     def parse_args_handler(self, args):
         if not args.tests:
-           args.tests = [external_media_tests.manifest]
+            args.tests = [external_media_tests.manifest]
 
 
     @staticmethod
     def get_urls(manifest):
         with open(manifest, 'r'):
             return [line[0] for line in read_ini(manifest)]