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 20 matching lines...) Expand all Loading... |
31 values=[float(v) for v in metrics[m]], | 31 values=[float(v) for v in metrics[m]], |
32 important=True)) | 32 important=True)) |
33 | 33 |
34 else: | 34 else: |
35 results.AddValue(scalar.ScalarValue( | 35 results.AddValue(scalar.ScalarValue( |
36 results.current_page, trace_name, units='ms', | 36 results.current_page, trace_name, units='ms', |
37 value=float(metrics[m]), important=True)) | 37 value=float(metrics[m]), important=True)) |
38 | 38 |
39 | 39 |
40 # android: See media.android.tough_video_cases below | 40 # android: See media.android.tough_video_cases below |
41 # win8: crbug.com/531618 | |
42 # crbug.com/565180: Only include cases that report time_to_play | 41 # crbug.com/565180: Only include cases that report time_to_play |
43 @benchmark.Disabled('android', 'win8') | 42 @benchmark.Disabled('android') |
44 class Media(perf_benchmark.PerfBenchmark): | 43 class Media(perf_benchmark.PerfBenchmark): |
45 """Obtains media metrics for key user scenarios.""" | 44 """Obtains media metrics for key user scenarios.""" |
46 test = media.Media | 45 test = media.Media |
47 page_set = page_sets.ToughVideoCasesPageSet | 46 page_set = page_sets.ToughVideoCasesPageSet |
48 | 47 |
49 @classmethod | 48 @classmethod |
50 def Name(cls): | 49 def Name(cls): |
51 return 'media.tough_video_cases' | 50 return 'media.tough_video_cases' |
52 | 51 |
53 | 52 |
54 # crbug.com/565180: Only include cases that don't report time_to_play | 53 # crbug.com/565180: Only include cases that don't report time_to_play |
55 @benchmark.Disabled('android', 'win8') | 54 @benchmark.Disabled('android') |
56 class MediaExtra(perf_benchmark.PerfBenchmark): | 55 class MediaExtra(perf_benchmark.PerfBenchmark): |
57 """Obtains extra media metrics for key user scenarios.""" | 56 """Obtains extra media metrics for key user scenarios.""" |
58 test = media.Media | 57 test = media.Media |
59 page_set = page_sets.ToughVideoCasesExtraPageSet | 58 page_set = page_sets.ToughVideoCasesExtraPageSet |
60 | 59 |
61 @classmethod | 60 @classmethod |
62 def Name(cls): | 61 def Name(cls): |
63 return 'media.tough_video_cases_extra' | 62 return 'media.tough_video_cases_extra' |
64 | 63 |
65 | 64 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 137 |
139 @classmethod | 138 @classmethod |
140 def Name(cls): | 139 def Name(cls): |
141 return 'media.mse_cases' | 140 return 'media.mse_cases' |
142 | 141 |
143 def SetExtraBrowserOptions(self, options): | 142 def SetExtraBrowserOptions(self, options): |
144 # Needed to allow XHR requests to return stream objects. | 143 # Needed to allow XHR requests to return stream objects. |
145 options.AppendExtraBrowserArgs( | 144 options.AppendExtraBrowserArgs( |
146 ['--enable-experimental-web-platform-features', | 145 ['--enable-experimental-web-platform-features', |
147 '--disable-gesture-requirement-for-media-playback']) | 146 '--disable-gesture-requirement-for-media-playback']) |
OLD | NEW |