| 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.timeline import chrome_trace_category_filter | 9 from telemetry.timeline import chrome_trace_category_filter |
| 10 from telemetry.value import list_of_scalar_values | 10 from telemetry.value import list_of_scalar_values |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689. | 135 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689. |
| 136 class MediaAndroidToughVideoCasesTBMv2(_MediaTBMv2Benchmark): | 136 class MediaAndroidToughVideoCasesTBMv2(_MediaTBMv2Benchmark): |
| 137 """Obtains media metrics for key user scenarios on Android using TBMv2. | 137 """Obtains media metrics for key user scenarios on Android using TBMv2. |
| 138 Will eventually replace MediaAndroidToughVideoCases class.""" | 138 Will eventually replace MediaAndroidToughVideoCases class.""" |
| 139 | 139 |
| 140 tag = 'android' | 140 tag = 'android' |
| 141 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'} | 141 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'} |
| 142 | 142 |
| 143 @classmethod | 143 @classmethod |
| 144 def ShouldDisable(cls, possible_browser): | 144 def ShouldDisable(cls, possible_browser): |
| 145 return cls.IsSvelte(possible_browser) | 145 # crbug.com/707286: This benchmark is having issues with devices other |
| 146 # than Nexus 5X. Disabling on those devices until we figure out the cause. |
| 147 return (cls.IsSvelte(possible_browser) or |
| 148 possible_browser.platform.GetDeviceTypeName() != 'Nexus 5X') |
| 146 | 149 |
| 147 @classmethod | 150 @classmethod |
| 148 def Name(cls): | 151 def Name(cls): |
| 149 return 'media.android.tough_video_cases_tbmv2' | 152 return 'media.android.tough_video_cases_tbmv2' |
| 150 | 153 |
| 151 def SetExtraBrowserOptions(self, options): | 154 def SetExtraBrowserOptions(self, options): |
| 152 # By default, Chrome on Android does not allow autoplay | 155 # By default, Chrome on Android does not allow autoplay |
| 153 # of media: it requires a user gesture event to start a video. | 156 # of media: it requires a user gesture event to start a video. |
| 154 # The following option works around that. | 157 # The following option works around that. |
| 155 options.AppendExtraBrowserArgs( | 158 options.AppendExtraBrowserArgs( |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 204 |
| 202 @classmethod | 205 @classmethod |
| 203 def Name(cls): | 206 def Name(cls): |
| 204 return 'media.mse_cases' | 207 return 'media.mse_cases' |
| 205 | 208 |
| 206 def SetExtraBrowserOptions(self, options): | 209 def SetExtraBrowserOptions(self, options): |
| 207 # Needed to allow XHR requests to return stream objects. | 210 # Needed to allow XHR requests to return stream objects. |
| 208 options.AppendExtraBrowserArgs( | 211 options.AppendExtraBrowserArgs( |
| 209 ['--enable-experimental-web-platform-features', | 212 ['--enable-experimental-web-platform-features', |
| 210 '--disable-gesture-requirement-for-media-playback']) | 213 '--disable-gesture-requirement-for-media-playback']) |
| OLD | NEW |