Bug 1277136 - External Media Tests: Fix typos, update context usage, update gmp reset script. r=maja_zf
authorBryce Van Dyk <bvandyk@mozilla.com>
Wed, 01 Jun 2016 08:33:30 +1200
changeset 300019 23fde8ecfa91aeaa071bb19165a999b8606008f1
parent 300018 09bc7ad8065f7219ec69df1c75799c129e319ea8
child 300020 50e32be6552151fd71dd828b30b24749b5fbf4d4
push id77793
push usercpearce@mozilla.com
push dateWed, 01 Jun 2016 23:16:17 +0000
treeherdermozilla-inbound@23fde8ecfa91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1277136
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1277136 - External Media Tests: Fix typos, update context usage, update gmp reset script. r=maja_zf - Fix a typo in media.gmp-eme-adobe.version pref strings. - Update reset gmp script call to be from content context. This would fail if done from the chrome process. - Update reset gmp script to use new requestMediaKeySystemAccess syntax. MozReview-Commit-ID: FzDgkOWQF9A
dom/media/test/external/external_media_harness/testcase.py
--- a/dom/media/test/external/external_media_harness/testcase.py
+++ b/dom/media/test/external/external_media_harness/testcase.py
@@ -1,14 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import re
 import os
+import time
 
 from marionette import BrowserMobProxyTestCaseMixin, MarionetteTestCase
 from marionette_driver import Wait
 from marionette_driver.errors import TimeoutException
 from marionette.marionette_test import SkipTest
 
 from firefox_puppeteer.testcases import BaseFirefoxTestCase
 from external_media_tests.utils import (timestamp_now, verbose_until)
@@ -195,17 +196,17 @@ class NetworkBandwidthTestsMixin(object)
 
     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',
-[{initDataType: 'cenc'}]).then(
+[{initDataTypes: ['cenc']}]).then(
     function(access) {
         marionetteScriptFinished('success');
     },
     function(ex) {
         marionetteScriptFinished(ex);
     }
 );
 """
@@ -236,18 +237,19 @@ 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.prefs.set_pref('media.gmp.trial-create.enabled', False)
 
     def reset_GMP_version(self):
         if EMESetupMixin.version_needs_reset:
             with self.marionette.using_context('chrome'):
-                if self.prefs.get_pref('media.gm-eme-adobe.version'):
-                    self.prefs.set_pref('media.gm-eme-adobe.version', None)
+                if self.prefs.get_pref('media.gmp-eme-adobe.version'):
+                    self.prefs.reset_pref('media.gmp-eme-adobe.version')
+            with self.marionette.using_context('content'):
                 result = self.marionette.execute_async_script(
                     reset_adobe_gmp_script,
                     script_timeout=60000)
                 if not result == 'success':
                     raise VideoException(
                         'ERROR: Resetting Adobe GMP failed % s' % result)
 
             EMESetupMixin.version_needs_reset = False