Bug 1288582 - Hide Adobe Primetime plugin on Windows < Vista. r=spohl,a=gchang
authorChris Pearce <cpearce@mozilla.com>
Fri, 22 Jul 2016 14:30:22 +1200
changeset 340040 f430f9a12c98a00bfb0edce37947614e0a2b83cc
parent 340039 a9e8f70d870c1492bc3d64d3ac2f21f033d125cf
child 340041 b76912ba6b66e7e34117d909d55cf07c5afdae1b
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl, gchang
bugs1288582
milestone49.0a2
Bug 1288582 - Hide Adobe Primetime plugin on Windows < Vista. r=spohl,a=gchang We're not going to get a supported Adobe GMP on WinXP, so we shouldn't download it or show it in our add-on manager. MozReview-Commit-ID: I3cNsStmzsV
toolkit/modules/GMPUtils.jsm
toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
--- a/toolkit/modules/GMPUtils.jsm
+++ b/toolkit/modules/GMPUtils.jsm
@@ -71,18 +71,19 @@ this.GMPUtils = {
    */
   _isPluginSupported: function(aPlugin) {
     if (aPlugin.id == EME_ADOBE_ID) {
       if (Services.appinfo.OS != "WINNT") {
         // Non-Windows OSes currently unsupported by Adobe EME
         this.maybeReportTelemetry(aPlugin.id,
                                   "VIDEO_EME_ADOBE_UNSUPPORTED_REASON",
                                   GMPPluginUnsupportedReason.NOT_WINDOWS);
-        return false;
       }
+      // Windows Vista and later only supported by Adobe EME.
+      return AppConstants.isPlatformAndVersionAtLeast("win", "6");
     } else if (aPlugin.id == WIDEVINE_ID) {
       // The Widevine plugin is available for Windows versions Vista and later
       // and Mac OSX 10.7 and later.
       if (AppConstants.isPlatformAndVersionAtLeast("win", "6") ||
           AppConstants.isPlatformAndVersionAtLeast("macosx", "10.7")) {
         return true;
       }
       return false;
--- a/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
@@ -375,17 +375,17 @@ add_task(function* testEmeSupport() {
   yield GMPScope.GMPProvider.shutdown();
   GMPScope.GMPProvider.startup();
 
   for (let addon of gMockAddons) {
     yield gCategoryUtilities.openType("plugin");
     let doc = gManagerWindow.document;
     let item = get_addon_element(gManagerWindow, addon.id);
     if (addon.id == GMPScope.EME_ADOBE_ID) {
-      if (Services.appinfo.OS == "WINNT") {
+      if (AppConstants.isPlatformAndVersionAtLeast("win", "6")) {
         Assert.ok(item, "Adobe EME supported, found add-on element.");
       } else {
         Assert.ok(!item,
                   "Adobe EME not supported, couldn't find add-on element.");
       }
     } else if (addon.id == GMPScope.WIDEVINE_ID) {
       if (AppConstants.isPlatformAndVersionAtLeast("win", "6") ||
           AppConstants.isPlatformAndVersionAtLeast("macosx", "10.7")) {