Bug 1314445 - Fix test_eme_request_notifications to not fail on WinXP. r=bustage
authorChris Pearce <cpearce@mozilla.com>
Thu, 03 Nov 2016 14:43:04 +1300
changeset 363626 8891610c7c7bebe5fd0237c8df619a699cb12b6c
parent 363625 10c5b8d1bef5a8220c13d77127cac8bd1487eb43
child 363627 74f6bc91f74707dd075c3ce78d4839efe9709622
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1314445
milestone52.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 1314445 - Fix test_eme_request_notifications to not fail on WinXP. r=bustage MozReview-Commit-ID: 5zbySCZtI1b
dom/media/test/test_eme_request_notifications.html
--- a/dom/media/test/test_eme_request_notifications.html
+++ b/dom/media/test/test_eme_request_notifications.html
@@ -38,35 +38,37 @@ function Test(test) {
   });
 
   p.then(() => navigator.requestMediaKeySystemAccess(test.keySystem, gCencMediaKeySystemConfig))
    .then((keySystemAccess) => keySystemAccess.createMediaKeys());
 
   return res;
 }
 
+const isWinXP = navigator.userAgent.indexOf("Windows NT 5.1") != -1;
+
 var tests = [
   {
     keySystem: CLEARKEY_KEYSYSTEM,
     expectedStatus: 'cdm-created',
     prefs: [["media.eme.enabled", false]]
   },
   {
     keySystem: "com.widevine.alpha",
     expectedStatus: 'api-disabled',
     prefs: [["media.eme.enabled", false]]
   },
   {
     keySystem: "com.widevine.alpha",
-    expectedStatus: 'cdm-disabled',
+    expectedStatus: (isWinXP ? 'cdm-not-supported' : 'cdm-disabled'),
     prefs: [["media.eme.enabled", true], ["media.gmp-widevinecdm.enabled", false]]
   },
   {
     keySystem: "com.widevine.alpha",
-    expectedStatus: 'cdm-not-installed',
+    expectedStatus: (isWinXP ? 'cdm-not-supported' : 'cdm-not-installed'),
     prefs: [["media.eme.enabled", true], , ["media.gmp-widevinecdm.enabled", true]]
   },
   {
     keySystem: CLEARKEY_KEYSYSTEM,
     expectedStatus: 'cdm-created',
     prefs: [["media.eme.enabled", true]]
   }
 ];