Bug 1040937 - GMPInstallManager/OpenH264Provider using wrong directory/plugin names r=unfocused a=kwierso
authorRandell Jesup <rjesup@jesup.org>
Sat, 19 Jul 2014 00:58:22 -0400
changeset 217096 bdf16778db9c6f6834dfd3b18cce59e33931cc79
parent 217095 e6b5084690dcf70765bcb3ca036a051e92ace5c6
child 217097 36f891d6eaec3081e3c1f41a18f5ede367a57bc0
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersunfocused, kwierso
bugs1040937
milestone33.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 1040937 - GMPInstallManager/OpenH264Provider using wrong directory/plugin names r=unfocused a=kwierso
toolkit/modules/GMPInstallManager.jsm
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xml
--- a/toolkit/modules/GMPInstallManager.jsm
+++ b/toolkit/modules/GMPInstallManager.jsm
@@ -9,17 +9,17 @@ this.EXPORTED_SYMBOLS = [];
 const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} =
   Components;
 // Chunk size for the incremental downloader
 const DOWNLOAD_CHUNK_BYTES_SIZE = 300000;
 // Incremental downloader interval
 const DOWNLOAD_INTERVAL  = 0;
 // 1 day default
 const DEFAULT_SECONDS_BETWEEN_CHECKS = 60 * 60 * 24;
-const OPEN_H264_ID = "openh264-plugin@cisco.com";
+const OPEN_H264_ID = "gmp-gmpopenh264";
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/FileUtils.jsm");
 Cu.import("resource://gre/modules/Promise.jsm");
 Cu.import("resource://gre/modules/Preferences.jsm");
 Cu.import("resource://gre/modules/Log.jsm");
 Cu.import("resource://gre/modules/osfile.jsm");
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
@@ -165,30 +165,30 @@ add_test(function test_checkForAddons_no
 /**
  * Tests that getting a response with a single addon works as expected
  */
 add_test(function test_checkForAddons_singleAddonNoUpdates() {
   let responseXML =
     "<?xml version=\"1.0\"?>" +
     "<updates>" +
     "    <addons>" +
-    "        <addon id=\"openh264-plugin@cisco.com\"" +
+    "        <addon id=\"gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha256\"" +
     "               hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"1.1\"/>" +
     "  </addons>" +
     "</updates>"
   overrideXHR(200, responseXML);
   let installManager = new GMPInstallManager();
   let promise = installManager.checkForAddons();
   promise.then(function(gmpAddons) {
     do_check_eq(gmpAddons.length, 1);
     let gmpAddon= gmpAddons[0];
-    do_check_eq(gmpAddon.id, "openh264-plugin@cisco.com");
+    do_check_eq(gmpAddon.id, "gmp-gmpopenh264");
     do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip");
     do_check_eq(gmpAddon.hashFunction, "sha256");
     do_check_eq(gmpAddon.hashValue, "1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
     do_check_eq(gmpAddon.version, "1.1");
     do_check_eq(gmpAddon.size, undefined);
     do_check_true(gmpAddon.isValid);
     do_check_true(gmpAddon.isOpenH264);
     do_check_false(gmpAddon.isInstalled);
@@ -243,76 +243,76 @@ add_test(function test_checkForAddons_si
  * Also tests that invalid addons work correctly.
  */
 add_test(function test_checkForAddons_multipleAddonNoUpdatesSomeInvalid() {
   let responseXML =
     "<?xml version=\"1.0\"?>" +
     "<updates>" +
     "    <addons>" +
     // valid openh264
-    "        <addon id=\"openh264-plugin@cisco.com\"" +
+    "        <addon id=\"gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha256\"" +
     "               hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"1.1\"/>" +
     // valid not openh264
-    "        <addon id=\"NOT-openh264-plugin@cisco.com\"" +
+    "        <addon id=\"NOT-gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha512\"" +
     "               hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"9.1\"/>" +
     // noid
-    "        <addon notid=\"NOT-openh264-plugin@cisco.com\"" +
+    "        <addon notid=\"NOT-gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha512\"" +
     "               hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"9.1\"/>" +
     // no URL
-    "        <addon id=\"NOT-openh264-plugin@cisco.com\"" +
+    "        <addon id=\"NOT-gmp-gmpopenh264\"" +
     "               notURL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha512\"" +
     "               hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"9.1\"/>" +
     // no hash function
-    "        <addon id=\"NOT-openh264-plugin@cisco.com\"" +
+    "        <addon id=\"NOT-gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
     "               nothashFunction=\"sha512\"" +
     "               hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"9.1\"/>" +
     // no hash function
-    "        <addon id=\"NOT-openh264-plugin@cisco.com\"" +
+    "        <addon id=\"NOT-gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha512\"" +
     "               nothashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"9.1\"/>" +
     // not version
-    "        <addon id=\"NOT-openh264-plugin@cisco.com\"" +
+    "        <addon id=\"NOT-gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha512\"" +
     "               hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               notversion=\"9.1\"/>" +
     "  </addons>" +
     "</updates>"
   overrideXHR(200, responseXML);
   let installManager = new GMPInstallManager();
   let promise = installManager.checkForAddons();
   promise.then(function(gmpAddons) {
     do_check_eq(gmpAddons.length, 7);
     let gmpAddon= gmpAddons[0];
-    do_check_eq(gmpAddon.id, "openh264-plugin@cisco.com");
+    do_check_eq(gmpAddon.id, "gmp-gmpopenh264");
     do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip");
     do_check_eq(gmpAddon.hashFunction, "sha256");
     do_check_eq(gmpAddon.hashValue, "1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
     do_check_eq(gmpAddon.version, "1.1");
     do_check_true(gmpAddon.isValid);
     do_check_true(gmpAddon.isOpenH264);
     do_check_false(gmpAddon.isInstalled);
 
     gmpAddon= gmpAddons[1];
-    do_check_eq(gmpAddon.id, "NOT-openh264-plugin@cisco.com");
+    do_check_eq(gmpAddon.id, "NOT-gmp-gmpopenh264");
     do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip");
     do_check_eq(gmpAddon.hashFunction, "sha512");
     do_check_eq(gmpAddon.hashValue, "141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
     do_check_eq(gmpAddon.version, "9.1");
     do_check_true(gmpAddon.isValid);
     do_check_false(gmpAddon.isOpenH264);
     do_check_false(gmpAddon.isInstalled);
 
@@ -334,30 +334,30 @@ add_test(function test_checkForAddons_mu
 add_test(function test_checkForAddons_updatesWithAddons() {
   let responseXML =
     "<?xml version=\"1.0\"?>" +
     "    <updates>" +
     "        <update type=\"minor\" displayVersion=\"33.0a1\" appVersion=\"33.0a1\" platformVersion=\"33.0a1\" buildID=\"20140628030201\">" +
     "        <patch type=\"complete\" URL=\"http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/06/2014-06-28-03-02-01-mozilla-central/firefox-33.0a1.en-US.mac.complete.mar\" hashFunction=\"sha512\" hashValue=\"f3f90d71dff03ae81def80e64bba3e4569da99c9e15269f731c2b167c4fc30b3aed9f5fee81c19614120230ca333e73a5e7def1b8e45d03135b2069c26736219\" size=\"85249896\"/>" +
     "    </update>" +
     "    <addons>" +
-    "        <addon id=\"openh264-plugin@cisco.com\"" +
+    "        <addon id=\"gmp-gmpopenh264\"" +
     "               URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
     "               hashFunction=\"sha256\"" +
     "               hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
     "               version=\"1.1\"/>" +
     "  </addons>" +
     "</updates>"
   overrideXHR(200, responseXML);
   let installManager = new GMPInstallManager();
   let promise = installManager.checkForAddons();
   promise.then(function(gmpAddons) {
     do_check_eq(gmpAddons.length, 1);
     let gmpAddon= gmpAddons[0];
-    do_check_eq(gmpAddon.id, "openh264-plugin@cisco.com");
+    do_check_eq(gmpAddon.id, "gmp-gmpopenh264");
     do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip");
     do_check_eq(gmpAddon.hashFunction, "sha256");
     do_check_eq(gmpAddon.hashValue, "1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
     do_check_eq(gmpAddon.version, "1.1");
     do_check_true(gmpAddon.isValid);
     do_check_true(gmpAddon.isOpenH264);
     do_check_false(gmpAddon.isInstalled);
     installManager.uninit();
@@ -392,17 +392,17 @@ function test_checkForAddons_installAddo
   if (wantInstallReject) {
       fileSize = 1;
   }
 
   let responseXML =
     "<?xml version=\"1.0\"?>" +
     "<updates>" +
     "    <addons>" +
-    "        <addon id=\"" + id + "-openh264-plugin@cisco.com\"" +
+    "        <addon id=\"" + id + "-gmp-gmpopenh264\"" +
     "               URL=\"" + zipURL + "\"" +
     "               hashFunction=\"" + hashFunc + "\"" +
     "               hashValue=\"" + expectedDigest + "\"" +
     (includeSize ? " size=\"" + fileSize + "\"" : "") +
     "               version=\"1.1\"/>" +
     "  </addons>" +
     "</updates>"
 
@@ -487,17 +487,17 @@ add_test(function test_installAddon_noSe
 
   let data = "e~=0.5772156649";
   let zipFile = createNewZipFile(zipFileName, data);
 
   let responseXML =
     "<?xml version=\"1.0\"?>" +
     "<updates>" +
     "    <addons>" +
-    "        <addon id=\"openh264-plugin@cisco.com\"" +
+    "        <addon id=\"gmp-gmpopenh264\"" +
     "               URL=\"" + zipURL + "\"" +
     "               hashFunction=\"sha256\"" +
     "               hashValue=\"11221cbda000347b054028b527a60e578f919cb10f322ef8077d3491c6fcb474\"" +
     "               version=\"1.1\"/>" +
     "  </addons>" +
     "</updates>"
 
   overrideXHR(200, responseXML);
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -3083,17 +3083,17 @@ var gDetailView = {
         document.getElementById("detail-error").textContent = gStrings.ext.formatStringFromName(
           "details.notification.vulnerableNoUpdate",
           [this._addon.name], 1
         );
         var errorLink = document.getElementById("detail-error-link");
         errorLink.value = gStrings.ext.GetStringFromName("details.notification.vulnerableNoUpdate.link");
         errorLink.href = this._addon.blocklistURL;
         errorLink.hidden = false;
-      } else if (this._addon.id == "openh264-plugin@cisco.com" && !this._addon.isInstalled) {
+      } else if (this._addon.id == "gmp-gmpopenh264" && !this._addon.isInstalled) {
         this.node.setAttribute("notification", "warning");
         let warning = document.getElementById("detail-warning");
         warning.textContent = gStrings.ext.GetStringFromName("details.notification.openH264Pending");
       } else {
         this.node.removeAttribute("notification");
       }
     }
 
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -1289,17 +1289,17 @@
               this.setAttribute("notification", "error");
               this._error.textContent = gStrings.ext.formatStringFromName(
                 "notification.vulnerableNoUpdate",
                 [this.mAddon.name], 1
               );
               this._errorLink.value = gStrings.ext.GetStringFromName("notification.vulnerableNoUpdate.link");
               this._errorLink.href = this.mAddon.blocklistURL;
               this._errorLink.hidden = false;
-            } else if (this.mAddon.id == "openh264-plugin@cisco.com" && !this.mAddon.isInstalled) {
+            } else if (this.mAddon.id == "gmp-gmpopenh264" && !this.mAddon.isInstalled) {
               this.setAttribute("notification", "warning");
               this._warning.textContent = gStrings.ext.GetStringFromName("notification.openH264Pending");
             } else {
               this.removeAttribute("notification");
             }
           }
 
           this._preferencesBtn.hidden = (!this.mAddon.optionsURL) ||