Bug 1323128 Remove support for multi-package xpis r=rhelmer
authorAndrew Swan <aswan@mozilla.com>
Fri, 16 Dec 2016 21:43:38 -0800
changeset 450787 b133e1edcf02dd56fb121f5ef8750165764ded24
parent 450774 19b8210a8cce07f6af71de8bd53731169a99f561
child 450788 3fa1db0853db59597b844d06fef465d1538d7e52
push id38944
push userbmo:leftysolara@gmail.com
push dateSun, 18 Dec 2016 16:01:15 +0000
reviewersrhelmer
bugs1323128
milestone53.0a1
Bug 1323128 Remove support for multi-package xpis r=rhelmer MozReview-Commit-ID: LtLQ2phOlTK
toolkit/mozapps/extensions/amWebInstallListener.js
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/test/addons/test_install4/addon4.xpi
toolkit/mozapps/extensions/test/addons/test_install4/addon5.jar
toolkit/mozapps/extensions/test/addons/test_install4/addon6.xpi
toolkit/mozapps/extensions/test/addons/test_install4/addon7.jar
toolkit/mozapps/extensions/test/addons/test_install4/badaddon.jar
toolkit/mozapps/extensions/test/addons/test_install4/badaddon.xpi
toolkit/mozapps/extensions/test/addons/test_install4/icon.png
toolkit/mozapps/extensions/test/addons/test_install4/install.rdf
toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js
toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf
toolkit/mozapps/extensions/test/addons/test_update_multi2/addon.xpi
toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf
toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/multi_badid.xpi
toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/multi_broken.xpi
toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/multi_signed.xpi
toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/multi_unsigned.xpi
toolkit/mozapps/extensions/test/xpcshell/data/test_update_multi.rdf
toolkit/mozapps/extensions/test/xpcshell/test_install.js
toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_signed_multi.js
toolkit/mozapps/extensions/test/xpcshell/test_updateid.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
toolkit/mozapps/extensions/test/xpinstall/browser.ini
toolkit/mozapps/extensions/test/xpinstall/browser_multipackage.js
toolkit/mozapps/extensions/test/xpinstall/browser_signed_multipackage.js
toolkit/mozapps/extensions/test/xpinstall/multipackage.xpi
toolkit/mozapps/extensions/test/xpinstall/signed-multipackage.xpi
--- a/toolkit/mozapps/extensions/amWebInstallListener.js
+++ b/toolkit/mozapps/extensions/amWebInstallListener.js
@@ -110,27 +110,16 @@ Installer.prototype = {
         failed.push(install);
         break;
       case AddonManager.STATE_DOWNLOADED:
         // App disabled items are not compatible and so fail to install
         if (install.addon.appDisabled)
           failed.push(install);
         else
           installs.push(install);
-
-        if (install.linkedInstalls) {
-          for (let linkedInstall of install.linkedInstalls) {
-            linkedInstall.addListener(this);
-            // Corrupt or incompatible items fail to install
-            if (linkedInstall.state == AddonManager.STATE_DOWNLOAD_FAILED || linkedInstall.addon.appDisabled)
-              failed.push(linkedInstall);
-            else
-              installs.push(linkedInstall);
-          }
-        }
         break;
       case AddonManager.STATE_CANCELLED:
         // Just ignore cancelled downloads
         break;
       default:
         logger.warn("Download of " + install.sourceURI.spec + " in unexpected state " +
                     install.state);
       }
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -215,21 +215,22 @@ const BOOTSTRAP_REASONS = {
   ADDON_DISABLE   : 4,
   ADDON_INSTALL   : 5,
   ADDON_UNINSTALL : 6,
   ADDON_UPGRADE   : 7,
   ADDON_DOWNGRADE : 8
 };
 
 // Map new string type identifiers to old style nsIUpdateItem types
+// Type 32 was previously used for multipackage xpi files so it should
+// not be re-used since old files with that type may be floating around.
 const TYPES = {
   extension: 2,
   theme: 4,
   locale: 8,
-  multipackage: 32,
   dictionary: 64,
   experiment: 128,
 };
 
 if (!AppConstants.RELEASE_OR_BETA)
   TYPES.apiextension = 256;
 
 // Some add-on types that we track internally are presented as other types
@@ -1176,24 +1177,22 @@ let loadManifestFromRDF = Task.async(fun
         break;
       }
     }
   }
 
   if (!(addon.type in TYPES))
     throw new Error("Install manifest specifies unknown type: " + addon.type);
 
-  if (addon.type != "multipackage") {
-    if (!addon.id)
-      throw new Error("No ID in install manifest");
-    if (!gIDTest.test(addon.id))
-      throw new Error("Illegal add-on ID " + addon.id);
-    if (!addon.version)
-      throw new Error("No version in install manifest");
-  }
+  if (!addon.id)
+    throw new Error("No ID in install manifest");
+  if (!gIDTest.test(addon.id))
+    throw new Error("Illegal add-on ID " + addon.id);
+  if (!addon.version)
+    throw new Error("No version in install manifest");
 
   addon.strictCompatibility = !(addon.type in COMPATIBLE_BY_DEFAULT_TYPES) ||
                               getRDFProperty(ds, root, "strictCompatibility") == "true";
 
   // Only read these properties for extensions.
   if (addon.type == "extension") {
     addon.bootstrap = getRDFProperty(ds, root, "bootstrap") == "true";
 
@@ -5414,17 +5413,16 @@ class AddonInstall {
     this.type = options.type || null;
     this.version = options.version || null;
 
     this.file = null;
     this.ownsTempFile = null;
     this.certificate = null;
     this.certName = null;
 
-    this.linkedInstalls = null;
     this.addon = null;
     this.state = null;
 
     XPIProvider.installs.add(this);
   }
 
   /**
    * Starts installation of this add-on from whatever state it is currently at
@@ -5569,126 +5567,16 @@ class AddonInstall {
    */
   updateAddonURIs() {
     this.addon.sourceURI = this.sourceURI.spec;
     if (this.releaseNotesURI)
       this.addon.releaseNotesURI = this.releaseNotesURI.spec;
   }
 
   /**
-   * Fills out linkedInstalls with AddonInstall instances for the other files
-   * in a multi-package XPI.
-   *
-   * @param  aFiles
-   *         An array of { entryName, file } for each remaining file from the
-   *         multi-package XPI.
-   */
-  _createLinkedInstalls(aFiles) {
-    return Task.spawn((function*() {
-      if (aFiles.length == 0)
-        return;
-
-      // Create new AddonInstall instances for every remaining file
-      if (!this.linkedInstalls)
-        this.linkedInstalls = [];
-
-      for (let { entryName, file } of aFiles) {
-        logger.debug("Creating linked install from " + entryName);
-        let install = yield createLocalInstall(file);
-
-        // Make the new install own its temporary file
-        install.ownsTempFile = true;
-
-        this.linkedInstalls.push(install);
-
-        // If one of the internal XPIs was multipackage then move its linked
-        // installs to the outer install
-        if (install.linkedInstalls) {
-          this.linkedInstalls.push(...install.linkedInstalls);
-          install.linkedInstalls = null;
-        }
-
-        install.sourceURI = this.sourceURI;
-        install.releaseNotesURI = this.releaseNotesURI;
-        if (install.state != AddonManager.STATE_DOWNLOAD_FAILED)
-          install.updateAddonURIs();
-      }
-    }).bind(this));
-  }
-
-  /**
-   * Loads add-on manifests from a multi-package XPI file. Each of the
-   * XPI and JAR files contained in the XPI will be extracted. Any that
-   * do not contain valid add-ons will be ignored. The first valid add-on will
-   * be installed by this AddonInstall instance, the rest will have new
-   * AddonInstall instances created for them.
-   *
-   * @param  aZipReader
-   *         An open nsIZipReader for the multi-package XPI's files. This will
-   *         be closed before this method returns.
-   */
-  _loadMultipackageManifests(aZipReader) {
-    return Task.spawn((function*() {
-      let files = [];
-      let entries = aZipReader.findEntries("(*.[Xx][Pp][Ii]|*.[Jj][Aa][Rr])");
-      while (entries.hasMore()) {
-        let entryName = entries.getNext();
-        let file = getTemporaryFile();
-        try {
-          aZipReader.extract(entryName, file);
-          files.push({ entryName, file });
-        }
-        catch (e) {
-          logger.warn("Failed to extract " + entryName + " from multi-package " +
-                      "XPI", e);
-          file.remove(false);
-        }
-      }
-
-      aZipReader.close();
-
-      if (files.length == 0) {
-        return Promise.reject([AddonManager.ERROR_CORRUPT_FILE,
-                               "Multi-package XPI does not contain any packages to install"]);
-      }
-
-      // Find the first file that is a valid install and use it for
-      // the add-on that this AddonInstall instance will install.
-      for (let { entryName, file } of files) {
-        this.removeTemporaryFile();
-        try {
-          yield this.loadManifest(file);
-          logger.debug("Base multi-package XPI install came from " + entryName);
-          this.file = file;
-          this.ownsTempFile = true;
-
-          yield this._createLinkedInstalls(files.filter(f => f.file != file));
-          return undefined;
-        }
-        catch (e) {
-          // _createLinkedInstalls will log errors when it tries to process this
-          // file
-        }
-      }
-
-      // No valid add-on was found, delete all the temporary files
-      for (let { file } of files) {
-        try {
-          file.remove(true);
-        } catch (e) {
-          this.logger.warn("Could not remove temp file " + file.path);
-        }
-      }
-
-      return Promise.reject([AddonManager.ERROR_CORRUPT_FILE,
-                             "Multi-package XPI does not contain any valid packages to install"]);
-    }).bind(this));
-  }
-
-  /**
    * Called after the add-on is a local file and the signature and install
    * manifest can be read.
    *
    * @param  aCallback
    *         A function to call when the manifest has been loaded
    * @throws if the add-on does not contain a valid install manifest or the
    *         XPI is incorrectly signed
    */
@@ -5708,37 +5596,29 @@ class AddonInstall {
         // loadManifestFromZipReader performs the certificate verification for us
         this.addon = yield loadManifestFromZipReader(zipreader, this.installLocation);
       }
       catch (e) {
         zipreader.close();
         return Promise.reject([AddonManager.ERROR_CORRUPT_FILE, e]);
       }
 
-      // A multi-package XPI is a container, the add-ons it holds each
-      // have their own id.  Everything else had better have an id here.
-      if (!this.addon.id && this.addon.type != "multipackage") {
+      if (!this.addon.id) {
         let err = new Error(`Cannot find id for addon ${file.path}`);
         return Promise.reject([AddonManager.ERROR_CORRUPT_FILE, err]);
       }
 
       if (this.existingAddon) {
         // Check various conditions related to upgrades
         if (this.addon.id != this.existingAddon.id) {
           zipreader.close();
           return Promise.reject([AddonManager.ERROR_INCORRECT_ID,
                                  `Refusing to upgrade addon ${this.existingAddon.id} to different ID {this.addon.id}`]);
         }
 
-        if (this.addon.type == "multipackage") {
-          zipreader.close();
-          return Promise.reject([AddonManager.ERROR_UNEXPECTED_ADDON_TYPE,
-                                 `Refusing to upgrade addon ${this.existingAddon.id} to a multi-package xpi`]);
-        }
-
         if (this.existingAddon.type == "webextension" && this.addon.type != "webextension") {
           zipreader.close();
           return Promise.reject([AddonManager.ERROR_UNEXPECTED_ADDON_TYPE,
                                  "WebExtensions may not be upated to other extension types"]);
         }
       }
 
       if (mustSign(this.addon.type)) {
@@ -5773,19 +5653,16 @@ class AddonInstall {
           } else {
             zipreader.close();
             return Promise.reject([AddonManager.ERROR_CORRUPT_FILE,
                                    "XPI is incorrectly signed"]);
           }
         }
       }
 
-      if (this.addon.type == "multipackage")
-        return this._loadMultipackageManifests(zipreader);
-
       zipreader.close();
 
       this.updateAddonURIs();
 
       this.addon._install = this;
       this.name = this.addon.selectedLocale.name;
       this.type = this.addon.type;
       this.version = this.addon.version;
@@ -6657,22 +6534,16 @@ class DownloadAddonInstall extends Addon
                                                    this.listeners,
                                                    this.wrapper)) {
         // If a listener changed our state then do not proceed with the install
         if (this.state != AddonManager.STATE_DOWNLOADED)
           return;
 
         // proceed with the install state machine.
         this.install();
-        if (this.linkedInstalls) {
-          for (let install of this.linkedInstalls) {
-            if (install.state == AddonManager.STATE_DOWNLOADED)
-              install.install();
-          }
-        }
       }
     });
   }
 
   getInterface(iid) {
     if (iid.equals(Ci.nsIAuthPrompt2)) {
       let win = null;
       if (this.browser) {
@@ -6829,23 +6700,16 @@ AddonInstallWrapper.prototype = {
     let install = installFor(this);
     return install.addon ? install.addon.wrapper : null;
   },
 
   get sourceURI() {
     return installFor(this).sourceURI;
   },
 
-  get linkedInstalls() {
-    let install = installFor(this);
-    if (!install.linkedInstalls)
-      return null;
-    return install.linkedInstalls.map(i => i.wrapper);
-  },
-
   set _permHandler(handler) {
     installFor(this).permHandler = handler;
   },
 
   install: function() {
     installFor(this).install();
   },
 
deleted file mode 100644
index e57a4f5b6602c84ee47258c11bc7d5e0b35b9d9b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 93fbfbe6e14f45f51859fc93869ab461caefc961..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3613dab0478fbae0904623c0c2cc59d0375330ba..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1af178887d16c6fb7c9087a97338735a12928055..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_install4/badaddon.jar
+++ /dev/null
@@ -1,1 +0,0 @@
-This is corrupt
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_install4/badaddon.xpi
+++ /dev/null
@@ -1,1 +0,0 @@
-This is corrupt
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_install4/icon.png
+++ /dev/null
@@ -1,1 +0,0 @@
-This is ignored
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_install4/install.rdf
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- A multi-package XPI -->
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:install-manifest">
-    <em:type>32</em:type>
-  </Description>
-</RDF>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* exported startup, shutdown, install, uninstall */
-
-function install(data, reason) {}
-function startup(data, reason) {}
-function shutdown(data, reason) {}
-function uninstall(data, reason) {}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-<Description about="urn:mozilla:install-manifest">
-  <em:id>updatemulti@tests.mozilla.org</em:id>
-  <em:version>1.0</em:version>
-  <em:updateURL>http://localhost:4444/data/test_update_multi.rdf</em:updateURL>
-  <em:bootstrap>true</em:bootstrap>
-  <em:name>Test Addon 1</em:name>
-<em:targetApplication><Description>
-  <em:id>xpcshell@tests.mozilla.org</em:id>
-  <em:minVersion>1</em:minVersion>
-  <em:maxVersion>1</em:maxVersion>
-</Description></em:targetApplication>
-</Description>
-</RDF>
deleted file mode 100644
index febff06fa276ce3d66bf091c2e5a4f9a357287a2..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-<Description about="urn:mozilla:install-manifest">
-  <em:id>updatemulti@tests.mozilla.org</em:id>
-  <em:type>32</em:type>
-  <em:version>2.0</em:version>
-</Description>
-</RDF>
deleted file mode 100644
index 6e23eb214c8f3564f7f6ac508ff66c8780a13239..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 0ba0f30d1ac93ad3851a6f20bbd4f319b57e8201..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 33101f63c06d75b719177863779b8ffbb5b43b17..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3146870d86bc439a2a2e0985c2515ebe7d418483..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/data/test_update_multi.rdf
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:extension:updatemulti@tests.mozilla.org">
-    <em:updates>
-      <Seq>
-        <li>
-          <Description>
-            <em:version>2.0</em:version>
-            <em:targetApplication>
-              <Description>
-                <em:id>xpcshell@tests.mozilla.org</em:id>
-                <em:minVersion>1</em:minVersion>
-                <em:maxVersion>1</em:maxVersion>
-                <em:updateLink>http://localhost:4444/addons/test_update_multi2.xpi</em:updateLink>
-              </Description>
-            </em:targetApplication>
-          </Description>
-        </li>
-      </Seq>
-    </em:updates>
-  </Description>
-
-</RDF>
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
@@ -11,17 +11,16 @@ var Cu = Components.utils;
 const ADDON1_SIZE = 705 + 16 + 16;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
 Cu.import("resource://testing-common/httpd.js");
 
 var testserver;
 var gInstallDate;
-var gInstall = null;
 
 // The test extension uses an insecure update url.
 Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
 Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
@@ -60,17 +59,16 @@ function run_test_1() {
   prepare_test({ }, [
     "onNewInstall"
   ]);
 
   AddonManager.getInstallForFile(do_get_addon("test_install1"), function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
-    do_check_eq(install.linkedInstalls, null);
     do_check_eq(install.type, "extension");
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Test 1");
     do_check_eq(install.state, AddonManager.STATE_DOWNLOADED);
     do_check_true(install.addon.hasResource("install.rdf"));
     do_check_neq(install.addon.syncGUID, null);
     do_check_eq(install.addon.install, install);
     do_check_eq(install.addon.size, ADDON1_SIZE);
@@ -211,17 +209,16 @@ function check_test_1(installSyncGUID) {
   });
 }
 
 // Tests that an install from a url downloads.
 function run_test_2() {
   let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(install) {
     do_check_neq(install, null);
-    do_check_eq(install.linkedInstalls, null);
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Test 2");
     do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
     do_check_eq(install.iconURL, null);
     do_check_eq(install.sourceURI.spec, url);
 
     AddonManager.getAllInstalls(function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
@@ -644,313 +641,20 @@ function check_test_10(install) {
     AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
       do_check_eq(a3, null);
 
       do_execute_soon(run_test_11);
     });
   }));
 }
 
-// Tests that a multi-package install shows up as multiple installs with the
-// correct sourceURI.
 function run_test_11() {
-  prepare_test({ }, [
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall"
-  ]);
-
-  AddonManager.getInstallForFile(do_get_addon("test_install4"), function(install) {
-    ensure_test_completed();
-    do_check_neq(install, null);
-    do_check_neq(install.linkedInstalls, null);
-    do_check_eq(install.linkedInstalls.length, 5);
-
-    // Might be in any order so sort them based on ID
-    let installs = [install].concat(install.linkedInstalls);
-    installs.sort(function(a, b) {
-      if (a.state != b.state) {
-        if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-          return 1;
-        else if (b.state == AddonManager.STATE_DOWNLOAD_FAILED)
-          return -1;
-      }
-
-      // Don't care what order the failed installs show up in
-      if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-        return 0;
-
-      if (a.addon.id < b.addon.id)
-        return -1;
-      if (a.addon.id > b.addon.id)
-        return 1;
-      return 0;
-    });
-
-    // Comes from addon4.xpi and is made compatible by an update check
-    do_check_eq(installs[0].sourceURI, install.sourceURI);
-    do_check_eq(installs[0].addon.id, "addon4@tests.mozilla.org");
-    do_check_false(installs[0].addon.appDisabled);
-    do_check_eq(installs[0].version, "1.0");
-    do_check_eq(installs[0].name, "Multi Test 1");
-    do_check_eq(installs[0].state, AddonManager.STATE_DOWNLOADED);
-    do_check_true(hasFlag(installs[0].addon.operationsRequiringRestart,
-                          AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    // Comes from addon5.jar and is compatible by default
-    do_check_eq(installs[1].sourceURI, install.sourceURI);
-    do_check_eq(installs[1].addon.id, "addon5@tests.mozilla.org");
-    do_check_false(installs[1].addon.appDisabled);
-    do_check_eq(installs[1].version, "3.0");
-    do_check_eq(installs[1].name, "Multi Test 2");
-    do_check_eq(installs[1].state, AddonManager.STATE_DOWNLOADED);
-    do_check_true(hasFlag(installs[1].addon.operationsRequiringRestart,
-                          AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    // Comes from addon6.xpi and would be incompatible with strict compat enabled
-    do_check_eq(installs[2].sourceURI, install.sourceURI);
-    do_check_eq(installs[2].addon.id, "addon6@tests.mozilla.org");
-    do_check_false(installs[2].addon.appDisabled);
-    do_check_eq(installs[2].version, "2.0");
-    do_check_eq(installs[2].name, "Multi Test 3");
-    do_check_eq(installs[2].state, AddonManager.STATE_DOWNLOADED);
-    do_check_true(hasFlag(installs[2].addon.operationsRequiringRestart,
-                           AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    // Comes from addon7.jar and is made compatible by an update check
-    do_check_eq(installs[3].sourceURI, install.sourceURI);
-    do_check_eq(installs[3].addon.id, "addon7@tests.mozilla.org");
-    do_check_false(installs[3].addon.appDisabled);
-    do_check_eq(installs[3].version, "5.0");
-    do_check_eq(installs[3].name, "Multi Test 4");
-    do_check_eq(installs[3].state, AddonManager.STATE_DOWNLOADED);
-    do_check_true(hasFlag(installs[3].addon.operationsRequiringRestart,
-                          AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    do_check_eq(installs[4].state, AddonManager.STATE_DOWNLOAD_FAILED);
-    do_check_eq(installs[4].error, AddonManager.ERROR_CORRUPT_FILE);
-
-    do_check_eq(installs[5].state, AddonManager.STATE_DOWNLOAD_FAILED);
-    do_check_eq(installs[5].error, AddonManager.ERROR_CORRUPT_FILE);
-
-    AddonManager.getAllInstalls(function(aInstalls) {
-      do_check_eq(aInstalls.length, 4);
-
-      prepare_test({
-        "addon4@tests.mozilla.org": [
-          "onInstalling"
-        ],
-        "addon5@tests.mozilla.org": [
-          "onInstalling"
-        ],
-        "addon6@tests.mozilla.org": [
-          "onInstalling"
-        ],
-        "addon7@tests.mozilla.org": [
-          "onInstalling"
-        ]
-      }, {
-        "addon4@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ],
-        "addon5@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ],
-        "addon6@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ],
-        "addon7@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ]
-      }, callback_soon(check_test_11));
-
-      installs[0].install();
-      installs[1].install();
-      installs[3].install();
-
-      // Note that we install addon6 last. Since it doesn't need a restart to
-      // install it completes asynchronously which would otherwise make the
-      // onInstallStarted/onInstallEnded events go out of sequence unless this
-      // is the last install operation
-      installs[2].install();
-    });
-  });
-}
-
-function check_test_11() {
-  restartManager();
-
-  AddonManager.getAddonsByIDs(["addon4@tests.mozilla.org",
-                               "addon5@tests.mozilla.org",
-                               "addon6@tests.mozilla.org",
-                               "addon7@tests.mozilla.org"],
-                               function([a4, a5, a6, a7]) {
-    do_check_neq(a4, null);
-    do_check_neq(a5, null);
-    do_check_neq(a6, null);
-    do_check_neq(a7, null);
-
-    a4.uninstall();
-    a5.uninstall();
-    a6.uninstall();
-    a7.uninstall();
-
-    do_execute_soon(run_test_12);
-  });
-}
-
-// Same as test 11 but for a remote XPI
-function run_test_12() {
-  restartManager();
-
-  prepare_test({ }, [
-    "onNewInstall",
-  ]);
-
-  let url = "http://localhost:" + gPort + "/addons/test_install4.xpi";
-  AddonManager.getInstallForURL(url, function(install) {
-    gInstall = install;
-
-    ensure_test_completed();
-    do_check_neq(install, null);
-    do_check_eq(install.linkedInstalls, null);
-    do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
-
-    prepare_test({
-      "addon4@tests.mozilla.org": [
-        "onInstalling"
-      ],
-      "addon5@tests.mozilla.org": [
-        "onInstalling"
-      ],
-      "addon6@tests.mozilla.org": [
-        "onInstalling"
-      ],
-      "addon7@tests.mozilla.org": [
-        "onInstalling"
-      ]
-    }, {
-      "NO_ID": [
-        "onDownloadStarted",
-        "onNewInstall",
-        "onNewInstall",
-        "onNewInstall",
-        "onNewInstall",
-        "onNewInstall",
-        "onDownloadEnded"
-      ],
-      "addon4@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ],
-      "addon5@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ],
-      "addon6@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ],
-      "addon7@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ]
-    }, callback_soon(check_test_12));
-    install.install();
-  }, "application/x-xpinstall", null, "Multi Test 4");
-}
-
-function check_test_12() {
-  do_check_eq(gInstall.linkedInstalls.length, 5);
-
-  // Might be in any order so sort them based on ID
-  let installs = [gInstall].concat(gInstall.linkedInstalls);
-  installs.sort(function(a, b) {
-    if (a.state != b.state) {
-      if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-        return 1;
-      else if (b.state == AddonManager.STATE_DOWNLOAD_FAILED)
-        return -1;
-    }
-
-    // Don't care what order the failed installs show up in
-    if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-      return 0;
-
-    if (a.addon.id < b.addon.id)
-      return -1;
-    if (a.addon.id > b.addon.id)
-      return 1;
-    return 0;
-  });
-
-  // Comes from addon4.xpi and is made compatible by an update check
-  do_check_eq(installs[0].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[0].addon.id, "addon4@tests.mozilla.org");
-  do_check_false(installs[0].addon.appDisabled);
-  do_check_eq(installs[0].version, "1.0");
-  do_check_eq(installs[0].name, "Multi Test 1");
-  do_check_eq(installs[0].state, AddonManager.STATE_INSTALLED);
-
-  // Comes from addon5.jar and is compatible by default
-  do_check_eq(installs[1].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[1].addon.id, "addon5@tests.mozilla.org");
-  do_check_false(installs[1].addon.appDisabled);
-  do_check_eq(installs[1].version, "3.0");
-  do_check_eq(installs[1].name, "Multi Test 2");
-  do_check_eq(installs[1].state, AddonManager.STATE_INSTALLED);
-
-  // Comes from addon6.xpi and would be incompatible with strict compat enabled
-  do_check_eq(installs[2].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[2].addon.id, "addon6@tests.mozilla.org");
-  do_check_false(installs[2].addon.appDisabled);
-  do_check_eq(installs[2].version, "2.0");
-  do_check_eq(installs[2].name, "Multi Test 3");
-  do_check_eq(installs[2].state, AddonManager.STATE_INSTALLED);
-
-  // Comes from addon7.jar and is made compatible by an update check
-  do_check_eq(installs[3].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[3].addon.id, "addon7@tests.mozilla.org");
-  do_check_false(installs[3].addon.appDisabled);
-  do_check_eq(installs[3].version, "5.0");
-  do_check_eq(installs[3].name, "Multi Test 4");
-  do_check_eq(installs[3].state, AddonManager.STATE_INSTALLED);
-
-  do_check_eq(installs[4].state, AddonManager.STATE_DOWNLOAD_FAILED);
-  do_check_eq(installs[4].error, AddonManager.ERROR_CORRUPT_FILE);
-
-  do_check_eq(installs[5].state, AddonManager.STATE_DOWNLOAD_FAILED);
-  do_check_eq(installs[5].error, AddonManager.ERROR_CORRUPT_FILE);
-
-  restartManager();
-
-  AddonManager.getAddonsByIDs(["addon4@tests.mozilla.org",
-                               "addon5@tests.mozilla.org",
-                               "addon6@tests.mozilla.org",
-                               "addon7@tests.mozilla.org"],
-                               function([a4, a5, a6, a7]) {
-    do_check_neq(a4, null);
-    do_check_neq(a5, null);
-    do_check_neq(a6, null);
-    do_check_neq(a7, null);
-
-    a4.uninstall();
-    a5.uninstall();
-    a6.uninstall();
-    a7.uninstall();
-
-    do_execute_soon(run_test_13);
-  });
+  // Tests 11 and 12 were removed, to avoid churn of renumbering,
+  // just jump ahead to 13 here
+  run_test_13();
 }
 
 
 // Tests that cancelling an upgrade leaves the original add-on's pendingOperations
 // correct
 function run_test_13() {
   restartManager();
 
@@ -1812,17 +1516,16 @@ function run_test_30() {
   ]);
 
   AddonManager.getInstallForFile(do_get_addon("test_install7"), function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.state, AddonManager.STATE_DOWNLOAD_FAILED);
     do_check_eq(install.error, AddonManager.ERROR_CORRUPT_FILE);
-    do_check_eq(install.linkedInstalls, null);
 
     run_test_31();
   });
 }
 
 // Tests that a multi-package XPI with no valid add-ons inside shows up as a
 // corrupt file
 function run_test_31() {
@@ -1831,13 +1534,12 @@ function run_test_31() {
   ]);
 
   AddonManager.getInstallForFile(do_get_addon("test_install8"), function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.state, AddonManager.STATE_DOWNLOAD_FAILED);
     do_check_eq(install.error, AddonManager.ERROR_CORRUPT_FILE);
-    do_check_eq(install.linkedInstalls, null);
 
     end_test();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
@@ -11,17 +11,16 @@ var Cu = Components.utils;
 const ADDON1_SIZE = 705 + 16 + 16;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
 Cu.import("resource://testing-common/httpd.js");
 
 var testserver;
 var gInstallDate;
-var gInstall = null;
 
 // The test extension uses an insecure update url.
 Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
 Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, true);
 
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
@@ -60,17 +59,16 @@ function run_test_1() {
   prepare_test({ }, [
     "onNewInstall"
   ]);
 
   AddonManager.getInstallForFile(do_get_addon("test_install1"), function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
-    do_check_eq(install.linkedInstalls, null);
     do_check_eq(install.type, "extension");
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Test 1");
     do_check_eq(install.state, AddonManager.STATE_DOWNLOADED);
     do_check_true(install.addon.hasResource("install.rdf"));
     do_check_eq(install.addon.install, install);
     do_check_eq(install.addon.size, ADDON1_SIZE);
     do_check_true(hasFlag(install.addon.operationsRequiringRestart,
@@ -194,17 +192,16 @@ function check_test_1() {
 function run_test_2(aAddon) {
   let { id, version } = aAddon;
   restartManager();
   do_check_not_in_crash_annotation(id, version);
 
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(install) {
     do_check_neq(install, null);
-    do_check_eq(install.linkedInstalls, null);
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Test 2");
     do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
     do_check_eq(install.iconURL, null);
     do_check_eq(install.sourceURI.spec, url);
 
     AddonManager.getAllInstalls(function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
@@ -623,315 +620,20 @@ function check_test_10(install) {
     AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
       do_check_eq(a3, null);
 
       run_test_11();
     });
   }));
 }
 
-// Tests that a multi-package install shows up as multiple installs with the
-// correct sourceURI.
 function run_test_11() {
-  prepare_test({ }, [
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall",
-    "onNewInstall"
-  ]);
-
-  AddonManager.getInstallForFile(do_get_addon("test_install4"), function(install) {
-    ensure_test_completed();
-    do_check_neq(install, null);
-    do_check_neq(install.linkedInstalls, null);
-    do_check_eq(install.linkedInstalls.length, 5);
-
-    // Might be in any order so sort them based on ID
-    let installs = [install].concat(install.linkedInstalls);
-    installs.sort(function(a, b) {
-      if (a.state != b.state) {
-        if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-          return 1;
-        else if (b.state == AddonManager.STATE_DOWNLOAD_FAILED)
-          return -1;
-      }
-
-      // Don't care what order the failed installs show up in
-      if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-        return 0;
-
-      if (a.addon.id < b.addon.id)
-        return -1;
-      if (a.addon.id > b.addon.id)
-        return 1;
-      return 0;
-    });
-
-    // Comes from addon4.xpi and is made compatible by an update check
-    do_check_eq(installs[0].sourceURI, install.sourceURI);
-    do_check_eq(installs[0].addon.id, "addon4@tests.mozilla.org");
-    do_check_false(installs[0].addon.appDisabled);
-    do_check_eq(installs[0].version, "1.0");
-    do_check_eq(installs[0].name, "Multi Test 1");
-    do_check_eq(installs[0].state, AddonManager.STATE_DOWNLOADED);
-    do_check_true(hasFlag(installs[0].addon.operationsRequiringRestart,
-                          AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    // Comes from addon5.jar and is compatible by default
-    do_check_eq(installs[1].sourceURI, install.sourceURI);
-    do_check_eq(installs[1].addon.id, "addon5@tests.mozilla.org");
-    do_check_false(installs[1].addon.appDisabled);
-    do_check_eq(installs[1].version, "3.0");
-    do_check_eq(installs[1].name, "Multi Test 2");
-    do_check_eq(installs[1].state, AddonManager.STATE_DOWNLOADED);
-    do_check_true(hasFlag(installs[1].addon.operationsRequiringRestart,
-                          AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    // Comes from addon6.xpi and is incompatible
-    do_check_eq(installs[2].sourceURI, install.sourceURI);
-    do_check_eq(installs[2].addon.id, "addon6@tests.mozilla.org");
-    do_check_true(installs[2].addon.appDisabled);
-    do_check_eq(installs[2].version, "2.0");
-    do_check_eq(installs[2].name, "Multi Test 3");
-    do_check_eq(installs[2].state, AddonManager.STATE_DOWNLOADED);
-    do_check_false(hasFlag(installs[2].addon.operationsRequiringRestart,
-                           AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    // Comes from addon7.jar and is made compatible by an update check
-    do_check_eq(installs[3].sourceURI, install.sourceURI);
-    do_check_eq(installs[3].addon.id, "addon7@tests.mozilla.org");
-    do_check_false(installs[3].addon.appDisabled);
-    do_check_eq(installs[3].version, "5.0");
-    do_check_eq(installs[3].name, "Multi Test 4");
-    do_check_eq(installs[3].state, AddonManager.STATE_DOWNLOADED);
-    do_check_true(hasFlag(installs[3].addon.operationsRequiringRestart,
-                          AddonManager.OP_NEEDS_RESTART_INSTALL));
-
-    do_check_eq(installs[4].state, AddonManager.STATE_DOWNLOAD_FAILED);
-    do_check_eq(installs[4].error, AddonManager.ERROR_CORRUPT_FILE);
-
-    do_check_eq(installs[5].state, AddonManager.STATE_DOWNLOAD_FAILED);
-    do_check_eq(installs[5].error, AddonManager.ERROR_CORRUPT_FILE);
-
-    AddonManager.getAllInstalls(function(aInstalls) {
-      do_check_eq(aInstalls.length, 4);
-
-      prepare_test({
-        "addon4@tests.mozilla.org": [
-          "onInstalling"
-        ],
-        "addon5@tests.mozilla.org": [
-          "onInstalling"
-        ],
-        "addon6@tests.mozilla.org": [
-          ["onInstalling", false],
-          "onInstalled"
-        ],
-        "addon7@tests.mozilla.org": [
-          "onInstalling"
-        ]
-      }, {
-        "addon4@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ],
-        "addon5@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ],
-        "addon6@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ],
-        "addon7@tests.mozilla.org": [
-          "onInstallStarted",
-          "onInstallEnded"
-        ]
-      }, callback_soon(check_test_11));
-
-      installs[0].install();
-      installs[1].install();
-      installs[3].install();
-
-      // Note that we install addon6 last. Since it doesn't need a restart to
-      // install it completes asynchronously which would otherwise make the
-      // onInstallStarted/onInstallEnded events go out of sequence unless this
-      // is the last install operation
-      installs[2].install();
-    });
-  });
-}
-
-function check_test_11() {
-  restartManager();
-
-  AddonManager.getAddonsByIDs(["addon4@tests.mozilla.org",
-                               "addon5@tests.mozilla.org",
-                               "addon6@tests.mozilla.org",
-                               "addon7@tests.mozilla.org"],
-                               function([a4, a5, a6, a7]) {
-    do_check_neq(a4, null);
-    do_check_neq(a5, null);
-    do_check_neq(a6, null);
-    do_check_neq(a7, null);
-
-    a4.uninstall();
-    a5.uninstall();
-    a6.uninstall();
-    a7.uninstall();
-
-    do_execute_soon(run_test_12);
-  });
-}
-
-// Same as test 11 but for a remote XPI
-function run_test_12() {
-  restartManager();
-
-  prepare_test({ }, [
-    "onNewInstall",
-  ]);
-
-  let url = "http://localhost:4444/addons/test_install4.xpi";
-  AddonManager.getInstallForURL(url, function(install) {
-    gInstall = install;
-
-    ensure_test_completed();
-    do_check_neq(install, null);
-    do_check_eq(install.linkedInstalls, null);
-    do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
-
-    prepare_test({
-      "addon4@tests.mozilla.org": [
-        "onInstalling"
-      ],
-      "addon5@tests.mozilla.org": [
-        "onInstalling"
-      ],
-      "addon6@tests.mozilla.org": [
-        ["onInstalling", false],
-        "onInstalled"
-      ],
-      "addon7@tests.mozilla.org": [
-        "onInstalling"
-      ]
-    }, {
-      "NO_ID": [
-        "onDownloadStarted",
-        "onNewInstall",
-        "onNewInstall",
-        "onNewInstall",
-        "onNewInstall",
-        "onNewInstall",
-        "onDownloadEnded"
-      ],
-      "addon4@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ],
-      "addon5@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ],
-      "addon6@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ],
-      "addon7@tests.mozilla.org": [
-        "onInstallStarted",
-        "onInstallEnded"
-      ]
-    }, callback_soon(check_test_12));
-    install.install();
-  }, "application/x-xpinstall", null, "Multi Test 4");
-}
-
-function check_test_12() {
-  do_check_eq(gInstall.linkedInstalls.length, 5);
-
-  // Might be in any order so sort them based on ID
-  let installs = [gInstall].concat(gInstall.linkedInstalls);
-  installs.sort(function(a, b) {
-    if (a.state != b.state) {
-      if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-        return 1;
-      else if (b.state == AddonManager.STATE_DOWNLOAD_FAILED)
-        return -1;
-    }
-
-    // Don't care what order the failed installs show up in
-    if (a.state == AddonManager.STATE_DOWNLOAD_FAILED)
-      return 0;
-
-    if (a.addon.id < b.addon.id)
-      return -1;
-    if (a.addon.id > b.addon.id)
-      return 1;
-    return 0;
-  });
-
-  // Comes from addon4.xpi and is made compatible by an update check
-  do_check_eq(installs[0].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[0].addon.id, "addon4@tests.mozilla.org");
-  do_check_false(installs[0].addon.appDisabled);
-  do_check_eq(installs[0].version, "1.0");
-  do_check_eq(installs[0].name, "Multi Test 1");
-  do_check_eq(installs[0].state, AddonManager.STATE_INSTALLED);
-
-  // Comes from addon5.jar and is compatible by default
-  do_check_eq(installs[1].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[1].addon.id, "addon5@tests.mozilla.org");
-  do_check_false(installs[1].addon.appDisabled);
-  do_check_eq(installs[1].version, "3.0");
-  do_check_eq(installs[1].name, "Multi Test 2");
-  do_check_eq(installs[1].state, AddonManager.STATE_INSTALLED);
-
-  // Comes from addon6.xpi and is incompatible
-  do_check_eq(installs[2].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[2].addon.id, "addon6@tests.mozilla.org");
-  do_check_true(installs[2].addon.appDisabled);
-  do_check_eq(installs[2].version, "2.0");
-  do_check_eq(installs[2].name, "Multi Test 3");
-  do_check_eq(installs[2].state, AddonManager.STATE_INSTALLED);
-
-  // Comes from addon7.jar and is made compatible by an update check
-  do_check_eq(installs[3].sourceURI, gInstall.sourceURI);
-  do_check_eq(installs[3].addon.id, "addon7@tests.mozilla.org");
-  do_check_false(installs[3].addon.appDisabled);
-  do_check_eq(installs[3].version, "5.0");
-  do_check_eq(installs[3].name, "Multi Test 4");
-  do_check_eq(installs[3].state, AddonManager.STATE_INSTALLED);
-
-  do_check_eq(installs[4].state, AddonManager.STATE_DOWNLOAD_FAILED);
-  do_check_eq(installs[4].error, AddonManager.ERROR_CORRUPT_FILE);
-
-  do_check_eq(installs[5].state, AddonManager.STATE_DOWNLOAD_FAILED);
-  do_check_eq(installs[5].error, AddonManager.ERROR_CORRUPT_FILE);
-
-  restartManager();
-
-  AddonManager.getAddonsByIDs(["addon4@tests.mozilla.org",
-                               "addon5@tests.mozilla.org",
-                               "addon6@tests.mozilla.org",
-                               "addon7@tests.mozilla.org"],
-                               function([a4, a5, a6, a7]) {
-    do_check_neq(a4, null);
-    do_check_neq(a5, null);
-    do_check_neq(a6, null);
-    do_check_neq(a7, null);
-
-    a4.uninstall();
-    a5.uninstall();
-    a6.uninstall();
-    a7.uninstall();
-
-    do_execute_soon(run_test_13);
-  });
+  // Tests 11 and 12 were removed, to avoid churn of renumbering,
+  // just jump ahead to 13 here
+  run_test_13();
 }
 
 
 // Tests that cancelling an upgrade leaves the original add-on's pendingOperations
 // correct
 function run_test_13() {
   restartManager();
 
@@ -1695,17 +1397,16 @@ function run_test_30() {
   ]);
 
   AddonManager.getInstallForFile(do_get_addon("test_install7"), function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.state, AddonManager.STATE_DOWNLOAD_FAILED);
     do_check_eq(install.error, AddonManager.ERROR_CORRUPT_FILE);
-    do_check_eq(install.linkedInstalls, null);
 
     run_test_31();
   });
 }
 
 // Tests that a multi-package XPI with no valid add-ons inside shows up as a
 // corrupt file
 function run_test_31() {
@@ -1714,13 +1415,12 @@ function run_test_31() {
   ]);
 
   AddonManager.getInstallForFile(do_get_addon("test_install8"), function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.state, AddonManager.STATE_DOWNLOAD_FAILED);
     do_check_eq(install.error, AddonManager.ERROR_CORRUPT_FILE);
-    do_check_eq(install.linkedInstalls, null);
 
     end_test();
   });
 }
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_signed_multi.js
+++ /dev/null
@@ -1,55 +0,0 @@
-// Enable signature checks for these tests
-gUseRealCertChecks = true;
-// Disable update security
-Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
-
-const DATA = "data/signing_checks/";
-
-// Each multi-package XPI contains one valid theme and one other add-on that
-// has the following error state:
-const ADDONS = {
-  "multi_signed.xpi": 0,
-  "multi_badid.xpi": AddonManager.ERROR_CORRUPT_FILE,
-  "multi_broken.xpi": AddonManager.ERROR_CORRUPT_FILE,
-  "multi_unsigned.xpi": AddonManager.ERROR_SIGNEDSTATE_REQUIRED,
-};
-
-function createInstall(filename) {
-  return new Promise(resolve => {
-    AddonManager.getInstallForFile(do_get_file(DATA + filename), resolve, "application/x-xpinstall");
-  });
-}
-
-function run_test() {
-  createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "4", "4");
-  startupManager();
-
-  run_next_test();
-}
-
-function* test_addon(filename) {
-  do_print("Testing " + filename);
-
-  let install = yield createInstall(filename);
-  do_check_eq(install.state, AddonManager.STATE_DOWNLOADED);
-  do_check_eq(install.error, 0);
-
-  do_check_neq(install.linkedInstalls, null);
-  do_check_eq(install.linkedInstalls.length, 1);
-
-  let linked = install.linkedInstalls[0];
-  do_print(linked.state);
-  do_check_eq(linked.error, ADDONS[filename]);
-  if (linked.error == 0) {
-    do_check_eq(linked.state, AddonManager.STATE_DOWNLOADED);
-    linked.cancel();
-  }
-  else {
-    do_check_eq(linked.state, AddonManager.STATE_DOWNLOAD_FAILED);
-  }
-
-  install.cancel();
-}
-
-for (let filename of Object.keys(ADDONS))
-  add_task(test_addon.bind(null, filename));
--- a/toolkit/mozapps/extensions/test/xpcshell/test_updateid.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_updateid.js
@@ -57,30 +57,8 @@ add_task(function* test_update_new_id() 
   do_check_eq(install.existingAddon, addon);
 
   yield Assert.rejects(promiseInstallUpdate(install),
                        function(err) { return err.code == AddonManager.ERROR_INCORRECT_ID },
                        "Upgrade to a different ID fails");
 
   addon.uninstall();
 });
-
-// Verify that an update to a multi-package xpi fails
-add_task(function* test_update_new_id() {
-  yield promiseInstallFile(do_get_addon("test_update_multi1"));
-
-  let addon = yield promiseAddonByID("updatemulti@tests.mozilla.org");
-  do_check_neq(addon, null);
-  do_check_eq(addon.version, "1.0");
-
-  let update = yield promiseFindAddonUpdates(addon, AddonManager.UPDATE_WHEN_USER_REQUESTED);
-  let install = update.updateAvailable;
-  do_check_eq(install.name, addon.name);
-  do_check_eq(install.version, "2.0");
-  do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
-  do_check_eq(install.existingAddon, addon);
-
-  yield Assert.rejects(promiseInstallUpdate(install),
-                       function(err) { return err.code == AddonManager.ERROR_UNEXPECTED_ADDON_TYPE },
-                       "Upgrade to a multipackage xpi fails");
-
-  addon.uninstall();
-});
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
@@ -251,18 +251,16 @@ run-if = addon_signing
 run-if = addon_signing
 [test_signed_install.js]
 run-if = addon_signing
 run-sequentially = Uses hardcoded ports in xpi files.
 [test_signed_long.js]
 run-if = addon_signing
 [test_signed_migrate.js]
 run-if = addon_signing
-[test_signed_multi.js]
-run-if = addon_signing
 [test_startup.js]
 # Bug 676992: test consistently fails on Android
 fail-if = os == "android"
 [test_syncGUID.js]
 [test_strictcompatibility.js]
 [test_targetPlatforms.js]
 [test_theme.js]
 # Bug 676992: test consistently fails on Android
--- a/toolkit/mozapps/extensions/test/xpinstall/browser.ini
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser.ini
@@ -12,22 +12,20 @@ support-files =
   empty.xpi
   enabled.html
   hashRedirect.sjs
   head.js
   incompatible.xpi
   installchrome.html
   installtrigger.html
   installtrigger_frame.html
-  multipackage.xpi
   navigate.html
   redirect.sjs
   restartless.xpi
   restartless-unsigned.xpi
-  signed-multipackage.xpi
   signed-no-cn.xpi
   signed-no-o.xpi
   signed-tampered.xpi
   signed-untrusted.xpi
   signed.xpi
   signed2.xpi
   slowinstall.sjs
   startsoftwareupdate.html
@@ -73,26 +71,23 @@ skip-if = true # Bug 1084646
 [browser_httphash4.js]
 [browser_httphash5.js]
 [browser_httphash6.js]
 [browser_installchrome.js]
 [browser_localfile.js]
 [browser_localfile2.js]
 [browser_localfile3.js]
 [browser_localfile4.js]
-[browser_multipackage.js]
 [browser_navigateaway.js]
 [browser_navigateaway2.js]
 [browser_navigateaway3.js]
 skip-if = (os == "mac" || os == "win") # Bug 1198261
 [browser_navigateaway4.js]
 [browser_offline.js]
 [browser_relative.js]
-[browser_signed_multipackage.js]
-skip-if = require_signing
 [browser_signed_multiple.js]
 skip-if = require_signing
 [browser_signed_naming.js]
 skip-if = require_signing
 [browser_signed_tampered.js]
 skip-if = require_signing
 [browser_signed_trigger.js]
 skip-if = require_signing
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_multipackage.js
+++ /dev/null
@@ -1,52 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an signed add-on by navigating directly to the url
-function test() {
-  Harness.installConfirmCallback = confirm_install;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  gBrowser.selectedTab = gBrowser.addTab("about:blank");
-  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
-    gBrowser.loadURI(TESTROOT + "multipackage.xpi");
-  });
-}
-
-function get_item(items, name) {
-  for (let item of items) {
-    if (item.name == name)
-      return item;
-  }
-  ok(false, "Item for " + name + " was not listed");
-  return null;
-}
-
-function confirm_install(window) {
-  let items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 2, "Should be 2 items listed in the confirmation dialog");
-
-  let item = get_item(items, "XPI Test");
-  if (item) {
-    is(item.signed, "false", "Should not have listed the item as signed");
-    is(item.icon, "", "Should have listed no icon for the item");
-  }
-
-  item = get_item(items, "Signed XPI Test");
-  if (item) {
-    is(item.signed, "false", "Should have listed the item as signed");
-    is(item.icon, "", "Should have listed no icon for the item");
-  }
-
-  return true;
-}
-
-function install_ended(install, addon) {
-  install.cancel();
-}
-
-function finish_test(count) {
-  is(count, 2, "2 Add-ons should have been successfully installed");
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
-// ----------------------------------------------------------------------------
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_multipackage.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an signed add-on by navigating directly to the url
-function test() {
-  Harness.installConfirmCallback = confirm_install;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  gBrowser.selectedTab = gBrowser.addTab("about:blank");
-  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
-    gBrowser.loadURI(TESTROOT + "signed-multipackage.xpi");
-  });
-}
-
-function get_item(items, name) {
-  for (let item of items) {
-    if (item.name == name)
-      return item;
-  }
-  ok(false, "Item for " + name + " was not listed");
-  return null;
-}
-
-function confirm_install(window) {
-  let items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 2, "Should be 2 items listed in the confirmation dialog");
-
-  let item = get_item(items, "XPI Test");
-  if (item) {
-    is(item.signed, "false", "Should not have listed the item as signed");
-    is(item.icon, "", "Should have listed no icon for the item");
-  }
-
-  item = get_item(items, "Signed XPI Test");
-  if (item) {
-    is(item.cert, "(Object Signer)", "Should have seen the signer");
-    is(item.signed, "true", "Should have listed the item as signed");
-    is(item.icon, "", "Should have listed no icon for the item");
-  }
-
-  return true;
-}
-
-function install_ended(install, addon) {
-  install.cancel();
-}
-
-function finish_test(count) {
-  is(count, 2, "2 Add-ons should have been successfully installed");
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
-// ----------------------------------------------------------------------------
deleted file mode 100644
index d52f28c2872c9b3ff612cdcc436e65618a3b5c68..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 11fbe1861a3775fbe2383cbdb8d3a04b6ffed9b1..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001