1# Copyright 2013 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import sys 6 7from measurements import media 8from telemetry import test 9 10class Media(test.Test): 11 """Obtains media metrics for key user scenarios.""" 12 test = media.Media 13 page_set = 'page_sets/tough_video_cases.json' 14 15class MediaNetworkSimulation(test.Test): 16 """Obtains media metrics under different network simulations.""" 17 test = media.Media 18 enabled = not sys.platform.startswith('linux') 19 page_set = 'page_sets/media_cns_cases.json' 20 21class MediaAndroid(test.Test): 22 """Obtains media metrics for key user scenarios on Android.""" 23 test = media.Media 24 tag = 'android' 25 page_set = 'page_sets/tough_video_cases.json' 26 # Exclude crowd* media files (50fps 2160p). 27 options = { 28 'page_filter_exclude': '.*crowd.*' 29 } 30 31 def CustomizeBrowserOptions(self, options): 32 # Needed to run media actions in JS in Android. 33 options.AppendExtraBrowserArgs( 34 '--disable-gesture-requirement-for-media-playback') 35 36class MediaSourceExtensions(test.Test): 37 """Obtains media metrics for key media source extensions functions.""" 38 test = media.Media 39 enabled = not sys.platform.startswith('linux') 40 page_set = 'page_sets/mse_cases.json' 41 42 def CustomizeBrowserOptions(self, options): 43 # Needed to allow XHR requests to return stream objects. 44 options.AppendExtraBrowserArgs( 45 '--enable-experimental-web-platform-features') 46 47