| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from telemetry import benchmark | 7 from telemetry import benchmark |
| 8 from telemetry.page import page_test | 8 from telemetry.page import page_test |
| 9 from telemetry.value import list_of_scalar_values | 9 from telemetry.value import list_of_scalar_values |
| 10 from telemetry.value import scalar | 10 from telemetry.value import scalar |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 else: | 32 else: |
| 33 results.AddValue(scalar.ScalarValue( | 33 results.AddValue(scalar.ScalarValue( |
| 34 results.current_page, trace_name, units='ms', | 34 results.current_page, trace_name, units='ms', |
| 35 value=float(metrics[m]), important=True)) | 35 value=float(metrics[m]), important=True)) |
| 36 | 36 |
| 37 | 37 |
| 38 # android: See media.android.tough_video_cases below | 38 # android: See media.android.tough_video_cases below |
| 39 # xp: crbug.com/475191 | 39 # xp: crbug.com/475191 |
| 40 # win8: crbug.com/531618 | 40 # win8: crbug.com/531618 |
| 41 # win7: crbug.com/555079 | 41 # win7: crbug.com/555079 |
| 42 # crbug.com/565180: Only include cases that report time_to_play |
| 42 @benchmark.Disabled('android', 'xp', 'win8', 'win7') | 43 @benchmark.Disabled('android', 'xp', 'win8', 'win7') |
| 43 class Media(perf_benchmark.PerfBenchmark): | 44 class Media(perf_benchmark.PerfBenchmark): |
| 44 """Obtains media metrics for key user scenarios.""" | 45 """Obtains media metrics for key user scenarios.""" |
| 45 test = media.Media | 46 test = media.Media |
| 46 page_set = page_sets.ToughVideoCasesPageSet | 47 page_set = page_sets.ToughVideoCasesPageSet |
| 47 | 48 |
| 48 @classmethod | 49 @classmethod |
| 49 def Name(cls): | 50 def Name(cls): |
| 50 return 'media.tough_video_cases' | 51 return 'media.tough_video_cases' |
| 51 | 52 |
| 53 # crbug.com/565180: Only include cases that don't report time_to_play |
| 54 @benchmark.Disabled('android', 'xp', 'win8', 'win7') |
| 55 class MediaExtra(perf_benchmark.PerfBenchmark): |
| 56 """Obtains extra media metrics for key user scenarios.""" |
| 57 test = media.Media |
| 58 page_set = page_sets.ToughVideoCasesExtraPageSet |
| 59 |
| 60 @classmethod |
| 61 def Name(cls): |
| 62 return 'media.tough_video_cases_extra' |
| 63 |
| 52 | 64 |
| 53 @benchmark.Disabled('android', 'mac', 'xp') | 65 @benchmark.Disabled('android', 'mac', 'xp') |
| 54 class MediaNetworkSimulation(perf_benchmark.PerfBenchmark): | 66 class MediaNetworkSimulation(perf_benchmark.PerfBenchmark): |
| 55 """Obtains media metrics under different network simulations.""" | 67 """Obtains media metrics under different network simulations.""" |
| 56 test = media.Media | 68 test = media.Media |
| 57 page_set = page_sets.MediaCnsCasesPageSet | 69 page_set = page_sets.MediaCnsCasesPageSet |
| 58 | 70 |
| 59 @classmethod | 71 @classmethod |
| 60 def Name(cls): | 72 def Name(cls): |
| 61 return 'media.media_cns_cases' | 73 return 'media.media_cns_cases' |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 132 |
| 121 @classmethod | 133 @classmethod |
| 122 def Name(cls): | 134 def Name(cls): |
| 123 return 'media.mse_cases' | 135 return 'media.mse_cases' |
| 124 | 136 |
| 125 def SetExtraBrowserOptions(self, options): | 137 def SetExtraBrowserOptions(self, options): |
| 126 # Needed to allow XHR requests to return stream objects. | 138 # Needed to allow XHR requests to return stream objects. |
| 127 options.AppendExtraBrowserArgs( | 139 options.AppendExtraBrowserArgs( |
| 128 ['--enable-experimental-web-platform-features', | 140 ['--enable-experimental-web-platform-features', |
| 129 '--disable-gesture-requirement-for-media-playback']) | 141 '--disable-gesture-requirement-for-media-playback']) |
| OLD | NEW |