Bug 1299756 - Update VideoPuppeteer __str__ to output played ranges. r=maja_zf
authorBryce Van Dyk <bvandyk@mozilla.com>
Thu, 01 Sep 2016 10:50:05 +1200
changeset 312364 1f2c133d78b14c9b3faea5c31f70b94e90df0b8d
parent 312363 3f398fa60de08dc4c6c0076105c38135afac9ebd
child 312365 8f3ac8b34fa9d8b6cdd1783022e257b18913b9cf
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1299756
milestone51.0a1
Bug 1299756 - Update VideoPuppeteer __str__ to output played ranges. r=maja_zf 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):