OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 import platform | 5 import platform |
6 import sys | 6 import sys |
7 | 7 |
8 from measurements import media | 8 from measurements import media |
9 from telemetry import test | 9 from telemetry import test |
10 | 10 |
11 class Media(test.Test): | 11 class Media(test.Test): |
12 """Obtains media metrics for key user scenarios.""" | 12 """Obtains media metrics for key user scenarios.""" |
13 test = media.Media | 13 test = media.Media |
14 # Disable on Win8 crbug.com/326384 | 14 # Disable on Win8 crbug.com/326384 |
15 win8 = sys.platform.startswith('win') and '2008' in platform.release() | 15 win8 = sys.platform.startswith('win') and '2008' in platform.release() |
16 enabled = not win8 | 16 enabled = not win8 |
17 page_set = 'page_sets/tough_video_cases.json' | 17 page_set = 'page_sets/tough_video_cases.json' |
18 | 18 |
19 class MediaNetworkSimulation(test.Test): | 19 class MediaNetworkSimulation(test.Test): |
20 """Obtains media metrics under different network simulations.""" | 20 """Obtains media metrics under different network simulations.""" |
21 test = media.Media | 21 test = media.Media |
22 enabled = not sys.platform.startswith('linux') | |
23 page_set = 'page_sets/media_cns_cases.json' | 22 page_set = 'page_sets/media_cns_cases.json' |
24 | 23 |
25 class MediaAndroid(test.Test): | 24 class MediaAndroid(test.Test): |
26 """Obtains media metrics for key user scenarios on Android.""" | 25 """Obtains media metrics for key user scenarios on Android.""" |
27 test = media.Media | 26 test = media.Media |
28 tag = 'android' | 27 tag = 'android' |
29 page_set = 'page_sets/tough_video_cases.json' | 28 page_set = 'page_sets/tough_video_cases.json' |
30 # Exclude crowd* media files (50fps 2160p). | 29 # Exclude crowd* media files (50fps 2160p). |
31 options = { | 30 options = { |
32 'page_filter_exclude': '.*crowd.*' | 31 'page_filter_exclude': '.*crowd.*' |
33 } | 32 } |
34 | 33 |
35 def CustomizeBrowserOptions(self, options): | 34 def CustomizeBrowserOptions(self, options): |
36 # Needed to run media actions in JS in Android. | 35 # Needed to run media actions in JS in Android. |
37 options.AppendExtraBrowserArgs( | 36 options.AppendExtraBrowserArgs( |
38 '--disable-gesture-requirement-for-media-playback') | 37 '--disable-gesture-requirement-for-media-playback') |
39 | 38 |
40 class MediaSourceExtensions(test.Test): | 39 class MediaSourceExtensions(test.Test): |
41 """Obtains media metrics for key media source extensions functions.""" | 40 """Obtains media metrics for key media source extensions functions.""" |
42 test = media.Media | 41 test = media.Media |
43 page_set = 'page_sets/mse_cases.json' | 42 page_set = 'page_sets/mse_cases.json' |
44 | 43 |
45 def CustomizeBrowserOptions(self, options): | 44 def CustomizeBrowserOptions(self, options): |
46 # Needed to allow XHR requests to return stream objects. | 45 # Needed to allow XHR requests to return stream objects. |
47 options.AppendExtraBrowserArgs( | 46 options.AppendExtraBrowserArgs( |
48 '--enable-experimental-web-platform-features') | 47 '--enable-experimental-web-platform-features') |
49 | 48 |
OLD | NEW |