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 347468 8891610c7c7bebe5fd0237c8df619a699cb12b6c
parent 347467 10c5b8d1bef5a8220c13d77127cac8bd1487eb43
child 347469 74f6bc91f74707dd075c3ce78d4839efe9709622
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1314445
milestone52.0a1
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]]
   }
 ];