| 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 measurements import media | 5 from measurements import media |
| 6 import page_sets | 6 import page_sets |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 | 56 |
| 57 @benchmark.Enabled('android') | 57 @benchmark.Enabled('android') |
| 58 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689 | 58 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689 |
| 59 class MediaAndroid(benchmark.Benchmark): | 59 class MediaAndroid(benchmark.Benchmark): |
| 60 """Obtains media metrics for key user scenarios on Android.""" | 60 """Obtains media metrics for key user scenarios on Android.""" |
| 61 test = media.Media | 61 test = media.Media |
| 62 tag = 'android' | 62 tag = 'android' |
| 63 page_set = page_sets.ToughVideoCasesPageSet | 63 page_set = page_sets.ToughVideoCasesPageSet |
| 64 # Exclude is_4k and 50 fps media files (garden* & crowd*). | 64 # Exclude is_4k and 50 fps media files (garden* & crowd*). |
| 65 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} | 65 options = {'story_label_filter_exclude': 'is_4k,is_50fps'} |
| 66 | 66 |
| 67 @classmethod | 67 @classmethod |
| 68 def Name(cls): | 68 def Name(cls): |
| 69 return 'media.android.tough_video_cases' | 69 return 'media.android.tough_video_cases' |
| 70 | 70 |
| 71 | 71 |
| 72 @benchmark.Enabled('chromeos') | 72 @benchmark.Enabled('chromeos') |
| 73 class MediaChromeOS4kOnly(benchmark.Benchmark): | 73 class MediaChromeOS4kOnly(benchmark.Benchmark): |
| 74 """Benchmark for media performance on ChromeOS using only is_4k test content. | 74 """Benchmark for media performance on ChromeOS using only is_4k test content. |
| 75 """ | 75 """ |
| 76 test = media.Media | 76 test = media.Media |
| 77 tag = 'chromeOS4kOnly' | 77 tag = 'chromeOS4kOnly' |
| 78 page_set = page_sets.ToughVideoCasesPageSet | 78 page_set = page_sets.ToughVideoCasesPageSet |
| 79 options = { | 79 options = { |
| 80 'page_label_filter': 'is_4k', | 80 'story_label_filter': 'is_4k', |
| 81 # Exclude is_50fps test files: crbug/331816 | 81 # Exclude is_50fps test files: crbug/331816 |
| 82 'page_label_filter_exclude': 'is_50fps' | 82 'story_label_filter_exclude': 'is_50fps' |
| 83 } | 83 } |
| 84 | 84 |
| 85 @classmethod | 85 @classmethod |
| 86 def Name(cls): | 86 def Name(cls): |
| 87 return 'media.chromeOS4kOnly.tough_video_cases' | 87 return 'media.chromeOS4kOnly.tough_video_cases' |
| 88 | 88 |
| 89 | 89 |
| 90 @benchmark.Enabled('chromeos') | 90 @benchmark.Enabled('chromeos') |
| 91 class MediaChromeOS(benchmark.Benchmark): | 91 class MediaChromeOS(benchmark.Benchmark): |
| 92 """Benchmark for media performance on all ChromeOS platforms. | 92 """Benchmark for media performance on all ChromeOS platforms. |
| 93 | 93 |
| 94 This benchmark does not run is_4k content, there's a separate benchmark for | 94 This benchmark does not run is_4k content, there's a separate benchmark for |
| 95 that. | 95 that. |
| 96 """ | 96 """ |
| 97 test = media.Media | 97 test = media.Media |
| 98 tag = 'chromeOS' | 98 tag = 'chromeOS' |
| 99 page_set = page_sets.ToughVideoCasesPageSet | 99 page_set = page_sets.ToughVideoCasesPageSet |
| 100 # Exclude is_50fps test files: crbug/331816 | 100 # Exclude is_50fps test files: crbug/331816 |
| 101 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} | 101 options = {'story_label_filter_exclude': 'is_4k,is_50fps'} |
| 102 | 102 |
| 103 @classmethod | 103 @classmethod |
| 104 def Name(cls): | 104 def Name(cls): |
| 105 return 'media.chromeOS.tough_video_cases' | 105 return 'media.chromeOS.tough_video_cases' |
| 106 | 106 |
| 107 | 107 |
| 108 @benchmark.Disabled('android-webview') # crbug.com/419689 | 108 @benchmark.Disabled('android-webview') # crbug.com/419689 |
| 109 class MediaSourceExtensions(benchmark.Benchmark): | 109 class MediaSourceExtensions(benchmark.Benchmark): |
| 110 """Obtains media metrics for key media source extensions functions.""" | 110 """Obtains media metrics for key media source extensions functions.""" |
| 111 test = _MSEMeasurement | 111 test = _MSEMeasurement |
| 112 page_set = page_sets.MseCasesPageSet | 112 page_set = page_sets.MseCasesPageSet |
| 113 | 113 |
| 114 @classmethod | 114 @classmethod |
| 115 def Name(cls): | 115 def Name(cls): |
| 116 return 'media.mse_cases' | 116 return 'media.mse_cases' |
| 117 | 117 |
| 118 def CustomizeBrowserOptions(self, options): | 118 def CustomizeBrowserOptions(self, options): |
| 119 # Needed to allow XHR requests to return stream objects. | 119 # Needed to allow XHR requests to return stream objects. |
| 120 options.AppendExtraBrowserArgs( | 120 options.AppendExtraBrowserArgs( |
| 121 ['--enable-experimental-web-platform-features', | 121 ['--enable-experimental-web-platform-features', |
| 122 '--disable-gesture-requirement-for-media-playback']) | 122 '--disable-gesture-requirement-for-media-playback']) |
| OLD | NEW |