Bug 1299756 - Update VideoPuppeteer __str__ to output played ranges. r=maja_zf, a=test-only
authorBryce Van Dyk <bvandyk@mozilla.com>
Thu, 01 Sep 2016 10:50:05 +1200
changeset 348045 ec956e00de7275b8d6681016d66889a29b51a664
parent 348044 c6766e0626d69cfc359588176e2e877656e1c32a
child 348046 2374ab2d2b77a203efeef432a98f2b04c36f4749
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1299756
milestone50.0a2
Bug 1299756 - Update VideoPuppeteer __str__ to output played ranges. r=maja_zf, a=test-only This is a quality of life change. Since VideoPuppeteer uses, and since I plan on using the played ranges of a video element more, it is useful to output them as part of the str representation. MozReview-Commit-ID: LwVPfVtFF1v
dom/media/test/external/external_media_tests/media_utils/video_puppeteer.py
--- a/dom/media/test/external/external_media_tests/media_utils/video_puppeteer.py
+++ b/dom/media/test/external/external_media_tests/media_utils/video_puppeteer.py
@@ -263,25 +263,26 @@ class VideoPuppeteer(object):
                                                   script_args=[self.video])
 
     def __str__(self):
         messages = ['%s - test url: %s: {' % (type(self).__name__,
                                               self.test_url)]
         if self.video:
             messages += [
                 '\t(video)',
-                '\tcurrent_time: {0},'.format(self.current_time),
-                '\tduration: {0},'.format(self.duration),
-                '\texpected_duration: {0},'.format(self.expected_duration),
-                '\tlag: {0},'.format(self.lag),
-                '\turl: {0}'.format(self.video_url),
-                '\tsrc: {0}'.format(self.video_src),
-                '\tframes total: {0}'.format(self.total_frames),
-                '\t - dropped: {0}'.format(self.dropped_frames),
-                '\t - corrupted: {0}'.format(self.corrupted_frames)
+                '\tcurrent_time: {},'.format(self.current_time),
+                '\tduration: {},'.format(self.duration),
+                '\texpected_duration: {},'.format(self.expected_duration),
+                '\tplayed: {}'.format(self.played),
+                '\tlag: {},'.format(self.lag),
+                '\turl: {}'.format(self.video_url),
+                '\tsrc: {}'.format(self.video_src),
+                '\tframes total: {}'.format(self.total_frames),
+                '\t - dropped: {}'.format(self.dropped_frames),
+                '\t - corrupted: {}'.format(self.corrupted_frames)
             ]
         else:
             messages += ['\tvideo: None']
         messages.append('}')
         return '\n'.join(messages)
 
 
 class VideoException(Exception):