Bug 1329543 - Remove use of gmp-eme-adobe* prefs from external media tests. r=maja_zf
MozReview-Commit-ID: 3LHciqXJK2r
--- a/dom/media/test/external/external_media_harness/testcase.py
+++ b/dom/media/test/external/external_media_harness/testcase.py
@@ -195,55 +195,42 @@ class NetworkBandwidthTestsMixin(object)
self.proxy.limits({'downstream_kbps': 500})
self.run_videos(timeout=120)
def test_playback_limiting_bandwidth_1000(self):
self.proxy.limits({'downstream_kbps': 1000})
self.run_videos(timeout=120)
-reset_adobe_gmp_script = """
-navigator.requestMediaKeySystemAccess('com.adobe.primetime',
-[{initDataTypes: ['cenc']}]).then(
- function(access) {
- marionetteScriptFinished('success');
- },
- function(ex) {
- marionetteScriptFinished(ex);
- }
-);
-"""
-
-
reset_widevine_gmp_script = """
navigator.requestMediaKeySystemAccess('com.widevine.alpha',
[{initDataTypes: ['cenc']}]).then(
function(access) {
marionetteScriptFinished('success');
},
function(ex) {
marionetteScriptFinished(ex);
}
);
"""
class EMESetupMixin(object):
"""
- An object that needs to use the Adobe or Widevine GMP system must inherit
+ An object that needs to use the Widevine GMP system must inherit
from this class, and then call check_eme_system() to insure that everything
is setup correctly.
"""
version_needs_reset = True
def check_eme_system(self):
"""
- Download the most current version of the Adobe and Widevine GMP
+ Download the most current version of the Widevine GMP
Plugins. Verify that all MSE and EME prefs are set correctly. Raises
if things are not OK.
"""
self.set_eme_prefs()
self.reset_GMP_version()
assert(self.check_eme_prefs())
def set_eme_prefs(self):
@@ -251,31 +238,22 @@ class EMESetupMixin(object):
# https://bugzilla.mozilla.org/show_bug.cgi?id=1187471#c28
# 2015-09-28 cpearce says this is no longer necessary, but in case
# we are working with older firefoxes...
self.marionette.set_pref('media.gmp.trial-create.enabled', False)
def reset_GMP_version(self):
if EMESetupMixin.version_needs_reset:
with self.marionette.using_context(Marionette.CONTEXT_CHROME):
- if self.marionette.get_pref('media.gmp-eme-adobe.version'):
- self.marionette.reset_pref('media.gmp-eme-adobe.version')
if self.marionette.get_pref('media.gmp-widevinecdm.version'):
self.marionette.reset_pref('media.gmp-widevinecdm.version')
with self.marionette.using_context(Marionette.CONTEXT_CONTENT):
- adobe_result = self.marionette.execute_async_script(
- reset_adobe_gmp_script,
- script_timeout=60000)
widevine_result = self.marionette.execute_async_script(
reset_widevine_gmp_script,
script_timeout=60000)
- if not adobe_result == 'success':
- raise VideoException(
- 'ERROR: Resetting Adobe GMP failed {}'
- .format(adobe_result))
if not widevine_result == 'success':
raise VideoException(
'ERROR: Resetting Widevine GMP failed {}'
.format(widevine_result))
EMESetupMixin.version_needs_reset = False
def check_and_log_boolean_pref(self, pref_name, expected_value):
@@ -347,16 +325,12 @@ class EMESetupMixin(object):
return all([
self.check_and_log_boolean_pref(
'media.mediasource.enabled', True),
self.check_and_log_boolean_pref(
'media.eme.enabled', True),
self.check_and_log_boolean_pref(
'media.mediasource.mp4.enabled', True),
self.check_and_log_boolean_pref(
- 'media.gmp-eme-adobe.enabled', True),
- self.check_and_log_integer_pref(
- 'media.gmp-eme-adobe.version', 1),
- self.check_and_log_boolean_pref(
'media.gmp-widevinecdm.enabled', True),
self.chceck_and_log_version_string_pref(
'media.gmp-widevinecdm.version', '1.0.0.0')
])