| 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 legacy_page_test | 8 from telemetry.page import legacy_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 | 32 |
| 33 else: | 33 else: |
| 34 results.AddValue(scalar.ScalarValue( | 34 results.AddValue(scalar.ScalarValue( |
| 35 results.current_page, trace_name, units='ms', | 35 results.current_page, trace_name, units='ms', |
| 36 value=float(metrics[m]), important=True)) | 36 value=float(metrics[m]), important=True)) |
| 37 | 37 |
| 38 | 38 |
| 39 # android: See media.android.tough_video_cases below | 39 # android: See media.android.tough_video_cases below |
| 40 # win8: crbug.com/531618 | 40 # win8: crbug.com/531618 |
| 41 # win7: crbug.com/555079 | 41 # win7: crbug.com/555079 |
| 42 # mac: crbug.com/595665 | |
| 43 # crbug.com/565180: Only include cases that report time_to_play | 42 # crbug.com/565180: Only include cases that report time_to_play |
| 44 @benchmark.Disabled('android', 'win8', 'win7', 'mac') | 43 @benchmark.Disabled('android', 'win8', 'win7') |
| 45 class Media(perf_benchmark.PerfBenchmark): | 44 class Media(perf_benchmark.PerfBenchmark): |
| 46 """Obtains media metrics for key user scenarios.""" | 45 """Obtains media metrics for key user scenarios.""" |
| 47 test = media.Media | 46 test = media.Media |
| 48 page_set = page_sets.ToughVideoCasesPageSet | 47 page_set = page_sets.ToughVideoCasesPageSet |
| 49 | 48 |
| 50 @classmethod | 49 @classmethod |
| 51 def Name(cls): | 50 def Name(cls): |
| 52 return 'media.tough_video_cases' | 51 return 'media.tough_video_cases' |
| 53 | 52 |
| 54 | 53 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 138 |
| 140 @classmethod | 139 @classmethod |
| 141 def Name(cls): | 140 def Name(cls): |
| 142 return 'media.mse_cases' | 141 return 'media.mse_cases' |
| 143 | 142 |
| 144 def SetExtraBrowserOptions(self, options): | 143 def SetExtraBrowserOptions(self, options): |
| 145 # Needed to allow XHR requests to return stream objects. | 144 # Needed to allow XHR requests to return stream objects. |
| 146 options.AppendExtraBrowserArgs( | 145 options.AppendExtraBrowserArgs( |
| 147 ['--enable-experimental-web-platform-features', | 146 ['--enable-experimental-web-platform-features', |
| 148 '--disable-gesture-requirement-for-media-playback']) | 147 '--disable-gesture-requirement-for-media-playback']) |
| OLD | NEW |