Bug 555942: Name of AddonsManager.getAddons() is misleading/inconsistent. r=robstrong
authorDave Townsend <dtownsend@oxymoronical.com>
Mon, 26 Apr 2010 10:49:19 -0700
changeset 42060 f63f946b292fda914c9a1339d14db8978f70ce10
parent 42059 adfa8cb1c5ecd7a23ca5f1632908b84967090eea
child 42061 1fb9690044ad63ac880a063dbc9a89a59850849b
push id13184
push userdtownsend@mozilla.com
push dateMon, 10 May 2010 22:18:34 +0000
treeherdermozilla-central@5b027af3af29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobstrong
bugs555942
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 555942: Name of AddonsManager.getAddons() is misleading/inconsistent. r=robstrong
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/LightweightThemeManager.jsm
toolkit/mozapps/extensions/PluginProvider.jsm
toolkit/mozapps/extensions/XPIProvider.jsm
toolkit/mozapps/extensions/test/xpcshell/test_bootstrap.js
toolkit/mozapps/extensions/test/xpcshell/test_bug299716.js
toolkit/mozapps/extensions/test/xpcshell/test_bug299716_2.js
toolkit/mozapps/extensions/test/xpcshell/test_bug324121.js
toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
toolkit/mozapps/extensions/test/xpcshell/test_bug394300.js
toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
toolkit/mozapps/extensions/test/xpcshell/test_bug470377_1.js
toolkit/mozapps/extensions/test/xpcshell/test_bug470377_2.js
toolkit/mozapps/extensions/test/xpcshell/test_bug470377_3.js
toolkit/mozapps/extensions/test/xpcshell/test_bug470377_4.js
toolkit/mozapps/extensions/test/xpcshell/test_bug521905.js
toolkit/mozapps/extensions/test/xpcshell/test_bug526598.js
toolkit/mozapps/extensions/test/xpcshell/test_bug541420.js
toolkit/mozapps/extensions/test/xpcshell/test_checkcompatibility.js
toolkit/mozapps/extensions/test/xpcshell/test_disable.js
toolkit/mozapps/extensions/test/xpcshell/test_fuel.js
toolkit/mozapps/extensions/test/xpcshell/test_general.js
toolkit/mozapps/extensions/test/xpcshell/test_install.js
toolkit/mozapps/extensions/test/xpcshell/test_locale.js
toolkit/mozapps/extensions/test/xpcshell/test_manifest.js
toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js
toolkit/mozapps/extensions/test/xpcshell/test_migrate2.js
toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
toolkit/mozapps/extensions/test/xpcshell/test_registry.js
toolkit/mozapps/extensions/test/xpcshell/test_startup.js
toolkit/mozapps/extensions/test/xpcshell/test_theme.js
toolkit/mozapps/extensions/test/xpcshell/test_uninstall.js
toolkit/mozapps/extensions/test/xpcshell/test_update.js
toolkit/mozapps/extensions/test/xpcshell/test_upgrade.js
toolkit/mozapps/update/content/updates.js
toolkit/mozapps/update/nsUpdateService.js
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -437,38 +437,48 @@ var AddonManagerInternal = {
    * of types.
    *
    * @param  aTypes
    *         An optional array of types to retrieve. Each type is a string name
    * @param  aCallback
    *         A callback which will be passed an array of AddonInstalls
    * @throws if the aCallback argument is not specified
    */
-  getInstalls: function AMI_getInstalls(aTypes, aCallback) {
+  getInstallsByTypes: function AMI_getInstallsByTypes(aTypes, aCallback) {
     if (!aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     let installs = [];
 
-    new AsyncObjectCaller(this.providers, "getInstalls", {
+    new AsyncObjectCaller(this.providers, "getInstallsByTypes", {
       nextObject: function(aCaller, aProvider) {
-        callProvider(aProvider, "getInstalls", null, aTypes,
+        callProvider(aProvider, "getInstallsByTypes", null, aTypes,
                      function(aProviderInstalls) {
           installs = installs.concat(aProviderInstalls);
           aCaller.callNext();
         });
       },
 
       noMoreObjects: function(aCaller) {
         safeCall(aCallback, installs);
       }
     });
   },
 
   /**
+   * Asynchronously gets all current AddonInstalls.
+   *
+   * @param  aCallback
+   *         A callback which will be passed an array of AddonInstalls
+   */
+  getAllInstalls: function AMI_getAllInstalls(aCallback) {
+    this.getInstallsByTypes(null, aCallback);
+  },
+
+  /**
    * Checks whether installation is enabled for a particular mimetype.
    *
    * @param  aMimetype
    *         The mimetype to check
    * @return true if installation is enabled for the mimetype
    */
   isInstallEnabled: function AMI_isInstallEnabled(aMimetype) {
     for (let i = 0; i < this.providers.length; i++) {
@@ -579,23 +589,23 @@ var AddonManagerInternal = {
    * Asynchronously gets an add-on with a specific ID.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         The callback to pass the retrieved add-on to
    * @throws if the aId or aCallback arguments are not specified
    */
-  getAddon: function AMI_getAddon(aId, aCallback) {
+  getAddonByID: function AMI_getAddonByID(aId, aCallback) {
     if (!aId || !aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
-    new AsyncObjectCaller(this.providers, "getAddon", {
+    new AsyncObjectCaller(this.providers, "getAddonByID", {
       nextObject: function(aCaller, aProvider) {
-        callProvider(aProvider, "getAddon", null, aId, function(aAddon) {
+        callProvider(aProvider, "getAddonByID", null, aId, function(aAddon) {
           if (aAddon)
             safeCall(aCallback, aAddon);
           else
             aCaller.callNext();
         });
       },
 
       noMoreObjects: function(aCaller) {
@@ -608,25 +618,25 @@ var AddonManagerInternal = {
    * Asynchronously gets an array of add-ons.
    *
    * @param  aIds
    *         The array of IDs to retrieve
    * @param  aCallback
    *         The callback to pass an array of Addons to
    * @throws if the aId or aCallback arguments are not specified
    */
-  getAddons: function AMI_getAddons(aIds, aCallback) {
+  getAddonsByIDs: function AMI_getAddonsByIDs(aIds, aCallback) {
     if (!aIds || !aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     let addons = [];
 
     new AsyncObjectCaller(aIds, null, {
       nextObject: function(aCaller, aId) {
-        AddonManagerInternal.getAddon(aId, function(aAddon) {
+        AddonManagerInternal.getAddonByID(aId, function(aAddon) {
           addons.push(aAddon);
           aCaller.callNext();
         });
       },
 
       noMoreObjects: function(aCaller) {
         safeCall(aCallback, addons);
       }
@@ -659,35 +669,45 @@ var AddonManagerInternal = {
 
       noMoreObjects: function(aCaller) {
         safeCall(aCallback, addons);
       }
     });
   },
 
   /**
+   * Asynchronously gets all installed add-ons.
+   *
+   * @param  aCallback
+   *         A callback which will be passed an array of Addons
+   */
+  getAllAddons: function AMI_getAllAddons(aCallback) {
+    this.getAddonsByTypes(null, aCallback);
+  },
+
+  /**
    * Asynchronously gets add-ons that have operations waiting for an application
    * restart to complete.
    *
    * @param  aTypes
    *         An optional array of types to retrieve. Each type is a string name
    * @param  aCallback
    *         The callback to pass the array of Addons to
    * @throws if the aCallback argument is not specified
    */
-  getAddonsWithPendingOperations:
-  function AMI_getAddonsWithPendingOperations(aTypes, aCallback) {
+  getAddonsWithOperationsByTypes:
+  function AMI_getAddonsWithOperationsByTypes(aTypes, aCallback) {
     if (!aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     let addons = [];
 
-    new AsyncObjectCaller(this.providers, "getAddonsWithPendingOperations", {
+    new AsyncObjectCaller(this.providers, "getAddonsWithOperationsByTypes", {
       nextObject: function(aCaller, aProvider) {
-        callProvider(aProvider, "getAddonsWithPendingOperations", null, aTypes,
+        callProvider(aProvider, "getAddonsWithOperationsByTypes", null, aTypes,
                      function(aProviderAddons) {
           addons = addons.concat(aProviderAddons);
           aCaller.callNext();
         });
       },
 
       noMoreObjects: function(caller) {
         safeCall(aCallback, addons);
@@ -844,35 +864,43 @@ var AddonManager = {
     AddonManagerInternal.getInstallForURL(aUrl, aCallback, aMimetype, aHash,
                                           aName, aIconURL, aVersion, aLoadGroup);
   },
 
   getInstallForFile: function AM_getInstallForFile(aFile, aCallback, aMimetype) {
     AddonManagerInternal.getInstallForFile(aFile, aCallback, aMimetype);
   },
 
-  getAddon: function AM_getAddon(aId, aCallback) {
-    AddonManagerInternal.getAddon(aId, aCallback);
+  getAddonByID: function AM_getAddonByID(aId, aCallback) {
+    AddonManagerInternal.getAddonByID(aId, aCallback);
   },
 
-  getAddons: function AM_getAddons(aIds, aCallback) {
-    AddonManagerInternal.getAddons(aIds, aCallback);
+  getAddonsByIDs: function AM_getAddonsByIDs(aIds, aCallback) {
+    AddonManagerInternal.getAddonsByIDs(aIds, aCallback);
   },
 
-  getAddonsWithPendingOperations:
-  function AM_getAddonsWithPendingOperations(aTypes, aCallback) {
-    AddonManagerInternal.getAddonsWithPendingOperations(aTypes, aCallback);
+  getAddonsWithOperationsByTypes:
+  function AM_getAddonsWithOperationsByTypes(aTypes, aCallback) {
+    AddonManagerInternal.getAddonsWithOperationsByTypes(aTypes, aCallback);
   },
 
   getAddonsByTypes: function AM_getAddonsByTypes(aTypes, aCallback) {
     AddonManagerInternal.getAddonsByTypes(aTypes, aCallback);
   },
 
-  getInstalls: function AM_getInstalls(aTypes, aCallback) {
-    AddonManagerInternal.getInstalls(aTypes, aCallback);
+  getAllAddons: function AM_getAllAddons(aCallback) {
+    AddonManagerInternal.getAllAddons(aCallback);
+  },
+
+  getInstallsByTypes: function AM_getInstallsByTypes(aTypes, aCallback) {
+    AddonManagerInternal.getInstallsByTypes(aTypes, aCallback);
+  },
+
+  getAllInstalls: function AM_getAllInstalls(aCallback) {
+    AddonManagerInternal.getAllInstalls(aCallback);
   },
 
   isInstallEnabled: function AM_isInstallEnabled(aType) {
     return AddonManagerInternal.isInstallEnabled(aType);
   },
 
   isInstallAllowed: function AM_isInstallAllowed(aType, aUri) {
     return AddonManagerInternal.isInstallAllowed(aType, aUri);
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -341,17 +341,17 @@ var LightweightThemeManager = {
   /**
    * Called to get an Addon with a particular ID.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         A callback to pass the Addon to
    */
-  getAddon: function(aId, aCallback) {
+  getAddonByID: function(aId, aCallback) {
     let id = _getInternalID(aId);
     if (!id) {
       aCallback(null);
       return;
      }
 
     let theme = this.getUsedTheme(id);
     if (!theme) {
--- a/toolkit/mozapps/extensions/PluginProvider.jsm
+++ b/toolkit/mozapps/extensions/PluginProvider.jsm
@@ -81,17 +81,17 @@ var PluginProvider = {
   /**
    * Called to get an Addon with a particular ID.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         A callback to pass the Addon to
    */
-  getAddon: function PL_getAddon(aId, aCallback) {
+  getAddonByID: function PL_getAddon(aId, aCallback) {
     if (!this.plugins)
       this.buildPluginList();
 
     if (aId in this.plugins) {
       let name = this.plugins[aId].name;
       let description = this.plugins[aId].description;
 
       let tags = Cc["@mozilla.org/plugin/host;1"].
@@ -125,45 +125,45 @@ var PluginProvider = {
     }
 
     if (!this.plugins)
       this.buildPluginList();
 
     let results = [];
 
     for (let id in this.plugins) {
-      this.getAddon(id, function(aAddon) {
+      this.getAddonByID(id, function(aAddon) {
         results.push(aAddon);
       });
     }
 
     aCallback(results);
   },
 
   /**
    * Called to get Addons that have pending operations.
    *
    * @param  aTypes
    *         An array of types to fetch. Can be null to get all types
    * @param  aCallback
    *         A callback to pass an array of Addons to
    */
-  getAddonsWithPendingOperations: function PL_getAddonsWithPendingOperations(aTypes, aCallback) {
+  getAddonsWithOperationsByTypes: function PL_getAddonsWithOperationsByTypes(aTypes, aCallback) {
     aCallback([]);
   },
 
   /**
    * Called to get the current AddonInstalls, optionally restricting by type.
    *
    * @param  aTypes
    *         An array of types or null to get all types
    * @param  aCallback
    *         A callback to pass the array of AddonInstalls to
    */
-  getInstalls: function PL_getInstalls(aTypes, aCallback) {
+  getInstallsByTypes: function PL_getInstallsByTypes(aTypes, aCallback) {
     aCallback([]);
   },
 
   buildPluginList: function PL_buildPluginList() {
     let tags = Cc["@mozilla.org/plugin/host;1"].
                getService(Ci.nsIPluginHost).
                getPluginTags({});
 
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -1664,17 +1664,17 @@ var XPIProvider = {
   /**
    * Called to get an Addon with a particular ID.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         A callback to pass the Addon to
    */
-  getAddon: function XPI_getAddon(aId, aCallback) {
+  getAddonByID: function XPI_getAddonByID(aId, aCallback) {
     XPIDatabase.getVisibleAddonForID(aId, function(aAddon) {
       if (aAddon)
         aCallback(createWrapper(aAddon));
       else
         aCallback(null);
     });
   },
 
@@ -1695,18 +1695,18 @@ var XPIProvider = {
   /**
    * Called to get Addons that have pending operations.
    *
    * @param  aTypes
    *         An array of types to fetch. Can be null to get all types
    * @param  aCallback
    *         A callback to pass an array of Addons to
    */
-  getAddonsWithPendingOperations:
-  function XPI_getAddonsWithPendingOperations(aTypes, aCallback) {
+  getAddonsWithOperationsByTypes:
+  function XPI_getAddonsWithOperationsByTypes(aTypes, aCallback) {
     XPIDatabase.getVisibleAddonsWithPendingOperations(aTypes, function(aAddons) {
       let results = [createWrapper(a) for each (a in aAddons)];
       XPIProvider.installs.forEach(function(aInstall) {
         if (aInstall.state == AddonManager.STATE_INSTALLED &&
             !(aInstall.addon instanceof DBAddonInternal))
           results.push(createWrapper(aInstall.addon));
       });
       aCallback(results);
@@ -1717,17 +1717,17 @@ var XPIProvider = {
    * Called to get the current AddonInstalls, optionally limiting to a list of
    * types.
    *
    * @param  aTypes
    *         An array of types or null to get all types
    * @param  aCallback
    *         A callback to pass the array of AddonInstalls to
    */
-  getInstalls: function XPI_getInstalls(aTypes, aCallback) {
+  getInstallsByTypes: function XPI_getInstallsByTypes(aTypes, aCallback) {
     let results = [];
     this.installs.forEach(function(aInstall) {
       if (!aTypes || aTypes.indexOf(aInstall.type) >= 0)
         results.push(aInstall.wrapper);
     });
     aCallback(results);
   },
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap.js
@@ -51,17 +51,17 @@ function run_test_1() {
       "onInstallStarted",
       "onInstallEnded",
     ], check_test_1);
     install.install();
   });
 }
 
 function check_test_1() {
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_false(b1.userDisabled);
     do_check_true(b1.isActive);
     do_check_eq(getActivatedVersion(), 1);
     do_check_true(b1.hasResource("install.rdf"));
     do_check_true(b1.hasResource("bootstrap.js"));
@@ -69,27 +69,27 @@ function check_test_1() {
     do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
     let dir = profileDir.clone();
     dir.append("bootstrap1@tests.mozilla.org");
     dir.append("bootstrap.js");
     let uri = Services.io.newFileURI(dir).spec;
     do_check_eq(b1.getResourceURL("bootstrap.js"), uri);
 
-    AddonManager.getAddonsWithPendingOperations(null, function(list) {
+    AddonManager.getAddonsWithOperationsByTypes(null, function(list) {
       do_check_eq(list.length, 0);
 
       run_test_2();
     });
   });
 }
 
 // Tests that disabling doesn't require a restart
 function run_test_2() {
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     prepare_test({
       "bootstrap1@tests.mozilla.org": [
         ["onDisabling", false],
         "onDisabled"
       ]
     });
 
     b1.userDisabled = true;
@@ -98,17 +98,17 @@ function run_test_2() {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_true(b1.userDisabled);
     do_check_false(b1.isActive);
     do_check_eq(getActivatedVersion(), 0);
     do_check_not_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
-    AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(newb1) {
+    AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(newb1) {
       do_check_neq(newb1, null);
       do_check_eq(newb1.version, "1.0");
       do_check_false(newb1.appDisabled);
       do_check_true(newb1.userDisabled);
       do_check_false(newb1.isActive);
 
       run_test_3();
     });
@@ -118,30 +118,30 @@ function run_test_2() {
 // Test that restarting doesn't accidentally re-enable
 function run_test_3() {
   shutdownManager();
   do_check_eq(getActivatedVersion(), 0);
   startupManager(0, false);
   do_check_eq(getActivatedVersion(), 0);
   do_check_not_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_true(b1.userDisabled);
     do_check_false(b1.isActive);
 
     run_test_4();
   });
 }
 
 // Tests that enabling doesn't require a restart
 function run_test_4() {
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     prepare_test({
       "bootstrap1@tests.mozilla.org": [
         ["onEnabling", false],
         "onEnabled"
       ]
     });
 
     b1.userDisabled = false;
@@ -150,17 +150,17 @@ function run_test_4() {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_false(b1.userDisabled);
     do_check_true(b1.isActive);
     do_check_eq(getActivatedVersion(), 1);
     do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
-    AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(newb1) {
+    AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(newb1) {
       do_check_neq(newb1, null);
       do_check_eq(newb1.version, "1.0");
       do_check_false(newb1.appDisabled);
       do_check_false(newb1.userDisabled);
       do_check_true(newb1.isActive);
 
       run_test_5();
     });
@@ -171,17 +171,17 @@ function run_test_4() {
 function run_test_5() {
   shutdownManager();
   do_check_eq(getActivatedVersion(), 0);
   do_check_not_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
   startupManager(0, false);
   do_check_eq(getActivatedVersion(), 1);
   do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_false(b1.userDisabled);
     do_check_true(b1.isActive);
     do_check_false(isExtensionInAddonsList(profileDir, b1.id));
 
     run_test_6();
@@ -212,33 +212,33 @@ function run_test_6() {
       "onInstallStarted",
       "onInstallEnded",
     ], check_test_6);
     install.install();
   });
 }
 
 function check_test_6() {
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "2.0");
     do_check_false(b1.appDisabled);
     do_check_false(b1.userDisabled);
     do_check_true(b1.isActive);
     do_check_eq(getActivatedVersion(), 2);
     do_check_not_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
     do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "2.0");
 
     run_test_7();
   });
 }
 
 // Tests that uninstalling doesn't require a restart
 function run_test_7() {
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     prepare_test({
       "bootstrap1@tests.mozilla.org": [
         ["onUninstalling", false],
         "onUninstalled"
       ]
     });
 
     b1.uninstall();
@@ -247,22 +247,22 @@ function run_test_7() {
   });
 }
 
 function check_test_7() {
   ensure_test_completed();
   do_check_eq(getActivatedVersion(), 0);
   do_check_not_in_crash_annotation("bootstrap1@tests.mozilla.org", "2.0");
 
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_eq(b1, null);
 
     restartManager(0);
 
-    AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(newb1) {
+    AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(newb1) {
       do_check_eq(newb1, null);
 
       run_test_8();
     });
   });
 }
 
 // Test that a bootstrapped extension dropped into the profile loads properly
@@ -280,17 +280,17 @@ function run_test_8() {
   zip.extract("install.rdf", dir);
   dir = dir.parent;
   dir.append("bootstrap.js");
   zip.extract("bootstrap.js", dir);
   zip.close();
 
   startupManager(0, false);
 
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_false(b1.userDisabled);
     do_check_true(b1.isActive);
     do_check_eq(getActivatedVersion(), 1);
     do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
@@ -302,15 +302,15 @@ function run_test_8() {
 function run_test_9() {
   shutdownManager();
 
   let dir = profileDir.clone();
   dir.append("bootstrap1@tests.mozilla.org");
   dir.remove(true);
   startupManager(0, false);
 
-  AddonManager.getAddon("bootstrap1@tests.mozilla.org", function(b1) {
+  AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_eq(b1, null);
     do_check_not_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
     do_test_finished();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug299716.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug299716.js
@@ -189,17 +189,17 @@ function run_test() {
 /**
  * Check the versions of all items, and ask the extension manager to find updates.
  */
 function run_test_pt2() {
   dump("\n\n*** DONE INSTALLING NEW ITEMS\n\n");
   dump("\n\n*** RESTARTING EXTENSION MANAGER\n\n");
   restartManager();
 
-  AddonManager.getAddons([a.id for each (a in ADDONS)], function(items) {
+  AddonManager.getAddonsByIDs([a.id for each (a in ADDONS)], function(items) {
     dump("\n\n*** REQUESTING UPDATE\n\n");
     // checkListener will call run_test_pt3().
     next_test = run_test_pt3;
 
     // Try to update the items.
     for (var i = 0; i < ADDONS.length; i++) {
       var item = items[i];
       do_check_item(item, "0.1", ADDONS[i]);
@@ -226,17 +226,17 @@ function run_test_pt3() {
 /**
  * Check the final version of each extension.
  */
 function run_test_pt4() {
   dump("\n\n*** RESTARTING EXTENSION MANAGER\n\n");
   restartManager();
 
   dump("\n\n*** FINAL CHECKS\n\n");
-  AddonManager.getAddons([a.id for each (a in ADDONS)], function(items) {
+  AddonManager.getAddonsByIDs([a.id for each (a in ADDONS)], function(items) {
     for (var i = 0; i < ADDONS.length; i++) {
       var item = items[i];
       do_check_item(item, "0.2", ADDONS[i]);
     }
 
     testserver.stop(do_test_finished);
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug299716_2.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug299716_2.js
@@ -62,17 +62,17 @@ function run_test() {
   testserver.registerDirectory("/data/", dataDir);
   testserver.start(4444);
 
   startupManager();
 
   installAllFiles([do_get_addon(ADDON.addon)], function() {
     restartManager();
 
-    AddonManager.getAddon(ADDON.id, function(item) {
+    AddonManager.getAddonByID(ADDON.id, function(item) {
       do_check_eq(item.version, 0.1);
       do_check_false(item.isCompatible);
 
       item.findUpdates({
         onUpdateFinished: function(addon) {
           do_check_false(item.isCompatible);
 
           testserver.stop(do_test_finished);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug324121.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug324121.js
@@ -166,17 +166,17 @@ function run_test() {
   testserver = new nsHttpServer();
   testserver.registerDirectory("/data/", dataDir);
   testserver.start(4444);
 
   startupManager();
 
   installAllFiles([do_get_addon(a.addon) for each (a in ADDONS)], function() {
     restartManager();
-    AddonManager.getAddon(ADDONS[0].id, function(addon) {
+    AddonManager.getAddonByID(ADDONS[0].id, function(addon) {
       addon.userDisabled = true;
       restartManager();
 
       AddonManager.getAddonsByTypes(["extension"], function(installedItems) {
         var items = [];
 
         for (let k = 0; k < ADDONS.length; k++) {
           for (let i = 0; i < installedItems.length; i++) {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
@@ -121,21 +121,21 @@ function run_test() {
 
   Services.prefs.setBoolPref(PREF_MATCH_OS_LOCALE, false);
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "en-US");
 
   startupManager();
   installAllFiles([do_get_addon(a.addon) for each (a in ADDONS)], function() {
 
     restartManager();
-    AddonManager.getAddon(ADDONS[1].id, function(addon) {
+    AddonManager.getAddonByID(ADDONS[1].id, function(addon) {
       addon.userDisabled = true;
       restartManager();
 
-      AddonManager.getAddons([a.id for each (a in ADDONS)], function(installedItems) {
+      AddonManager.getAddonsByIDs([a.id for each (a in ADDONS)], function(installedItems) {
         installedItems.forEach(function(item) {
           updateListener.pendingCount++;
           item.findUpdates(updateListener, AddonManager.UPDATE_WHEN_USER_REQUESTED);
         });
       });
     });
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
@@ -46,22 +46,22 @@ function run_test()
 {
   // Setup for test
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
 
   // Install test add-on
   startupManager();
   installAllFiles([do_get_addon(ADDON)], function() {
-    AddonManager.getAddon(ID, function(addon) {
+    AddonManager.getAddonByID(ID, function(addon) {
       do_check_neq(addon, null);
       do_check_eq(addon.name, "Test theme");
       restartManager();
 
-      AddonManager.getAddon(ID, function(addon) {
+      AddonManager.getAddonByID(ID, function(addon) {
         do_check_neq(addon, null);
         do_check_eq(addon.optionsURL, null);
         do_check_eq(addon.aboutURL, null);
 
         do_test_finished();
       });
     });
   });
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
@@ -97,17 +97,17 @@ function shutdownTest()
 function run_test()
 {
   initTest();
 
   gExpectedURL = gTestURL.replace(/%ITEM_ID%/, "test@mozilla.org")
                          .replace(/%CUSTOM1%/, "custom_parameter_1")
                          .replace(/%CUSTOM2%/, "custom_parameter_2");
 
-  AddonManager.getAddon("test@mozilla.org", function(item) {
+  AddonManager.getAddonByID("test@mozilla.org", function(item) {
     // Initiate update
     item.findUpdates({
       onNoCompatibilityUpdateAvailable: function(addon) {
         do_throw("Should not have seen no compatibility update");
       },
 
       onUpdateAvailable: function(addon, install) {
         ensure_test_completed();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug394300.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug394300.js
@@ -67,18 +67,18 @@ function run_test()
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
   startupManager();
 
   installAllFiles([do_get_addon("test_bug394300_1"),
                    do_get_addon("test_bug394300_2")], function() {
 
     restartManager();
 
-    AddonManager.getAddons(["bug394300_1@tests.mozilla.org",
-                            "bug394300_2@tests.mozilla.org"], function(updates) {
+    AddonManager.getAddonsByIDs(["bug394300_1@tests.mozilla.org",
+                                 "bug394300_2@tests.mozilla.org"], function(updates) {
 
       do_check_neq(updates[0], null);
       do_check_neq(updates[1], null);
 
       server = new nsHttpServer();
       server.registerDirectory("/", do_get_file("data"));
       server.start(4444);
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
@@ -55,96 +55,96 @@ function run_test()
   installAllFiles([do_get_addon(ADDON)], function() {
     restartManager();
 
     run_test_1();
   });
 }
 
 function run_test_1() {
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     do_check_eq(addon.name, "fr Name");
     do_check_eq(addon.description, "fr Description");
 
     // Disable item
     addon.userDisabled = true;
     restartManager();
 
-    AddonManager.getAddon(ID, function(newAddon) {
+    AddonManager.getAddonByID(ID, function(newAddon) {
       do_check_neq(newAddon, null);
       do_check_eq(newAddon.name, "fr Name");
 
       run_test_2();
     });
   });
 }
 
 function run_test_2() {
   // Change locale. The more specific de-DE is the best match
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "de");
   restartManager();
 
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     do_check_eq(addon.name, "de-DE Name");
     do_check_eq(addon.description, null);
 
     run_test_3();
   });
 }
 
 function run_test_3() {
   // Change locale. Locale case should have no effect
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "DE-de");
   restartManager();
 
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     do_check_eq(addon.name, "de-DE Name");
     do_check_eq(addon.description, null);
 
     run_test_4();
   });
 }
 
 function run_test_4() {
   // Change locale. es-ES should closely match
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "es-AR");
   restartManager();
 
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     do_check_eq(addon.name, "es-ES Name");
     do_check_eq(addon.description, "es-ES Description");
 
     run_test_5();
   });
 }
 
 function run_test_5() {
   // Change locale. Either zh-CN or zh-TW could match
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "zh");
   restartManager();
 
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     if (addon.name != "zh-TW Name" && addon.name != "zh-CN Name")
       do_throw("zh matched to " + addon.name);
 
     run_test_6();
   });
 }
 
 function run_test_6() {
   // Unknown locale should try to match against en-US as well. Of en,en-GB
   // en should match as being less specific
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "nl-NL");
   restartManager();
 
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     do_check_eq(addon.name, "en Name");
     do_check_eq(addon.description, "en Description");
 
     do_test_finished();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
@@ -44,17 +44,17 @@ function run_test()
   // Setup for test
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
 
   // Install test add-on
   startupManager();
   installAllFiles([do_get_addon(ADDON)], function() {
     restartManager();
-    AddonManager.getAddon(ID, function(addon) {
+    AddonManager.getAddonByID(ID, function(addon) {
       do_check_neq(addon, null);
       do_check_eq(addon.name, "Deutsches W\u00f6rterbuch");
       do_check_eq(addon.name.length, 20);
 
       do_test_finished();
     });
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_1.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_1.js
@@ -58,22 +58,22 @@ function run_test() {
   server.registerDirectory("/", do_get_file("data/test_bug470377"));
   server.start(4444);
 
   startupManager();
 
   installAllFiles([do_get_addon(a) for each (a in ADDONS)], function() {
     restartManager();
 
-    AddonManager.getAddons(["bug470377_1@tests.mozilla.org",
-                            "bug470377_2@tests.mozilla.org",
-                            "bug470377_3@tests.mozilla.org",
-                            "bug470377_4@tests.mozilla.org",
-                            "bug470377_5@tests.mozilla.org"],
-                            function([a1, a2, a3, a4, a5]) {
+    AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org",
+                                 "bug470377_2@tests.mozilla.org",
+                                 "bug470377_3@tests.mozilla.org",
+                                 "bug470377_4@tests.mozilla.org",
+                                 "bug470377_5@tests.mozilla.org"],
+                                 function([a1, a2, a3, a4, a5]) {
       do_check_eq(a1, null);
       do_check_eq(a2, null);
       do_check_eq(a3, null);
       do_check_neq(a4, null);
       do_check_neq(a5, null);
 
       server.stop(do_test_finished);
     });
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_2.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_2.js
@@ -60,22 +60,22 @@ function run_test() {
   server.registerDirectory("/", do_get_file("data/test_bug470377"));
   server.start(4444);
 
   startupManager();
 
   installAllFiles([do_get_addon(a) for each (a in ADDONS)], function() {
     restartManager();
 
-    AddonManager.getAddons(["bug470377_1@tests.mozilla.org",
-                            "bug470377_2@tests.mozilla.org",
-                            "bug470377_3@tests.mozilla.org",
-                            "bug470377_4@tests.mozilla.org",
-                            "bug470377_5@tests.mozilla.org"],
-                            function([a1, a2, a3, a4, a5]) {
+    AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org",
+                                 "bug470377_2@tests.mozilla.org",
+                                 "bug470377_3@tests.mozilla.org",
+                                 "bug470377_4@tests.mozilla.org",
+                                 "bug470377_5@tests.mozilla.org"],
+                                 function([a1, a2, a3, a4, a5]) {
       do_check_eq(a1, null);
       do_check_neq(a2, null);
       do_check_neq(a3, null);
       do_check_neq(a4, null);
       do_check_neq(a5, null);
 
       server.stop(do_test_finished);
     });
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_3.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_3.js
@@ -73,22 +73,22 @@ function run_test() {
   source.copyTo(dest, "install.rdf");
 
   startupManager();
 
   run_test_1();
 }
 
 function run_test_1() {
-  AddonManager.getAddons(["bug470377_1@tests.mozilla.org",
-                          "bug470377_2@tests.mozilla.org",
-                          "bug470377_3@tests.mozilla.org",
-                          "bug470377_4@tests.mozilla.org",
-                          "bug470377_5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org",
+                               "bug470377_2@tests.mozilla.org",
+                               "bug470377_3@tests.mozilla.org",
+                               "bug470377_4@tests.mozilla.org",
+                               "bug470377_5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     do_check_neq(a1, null);
     do_check_false(a1.isActive);
     do_check_neq(a2, null);
     do_check_false(a2.isActive);
     do_check_neq(a3, null);
     do_check_false(a3.isActive);
     do_check_neq(a4, null);
     do_check_true(a4.isActive);
@@ -99,22 +99,22 @@ function run_test_1() {
   });
 }
 
 function run_test_2() {
   // Disable compatibility checks
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.2", false);
   restartManager();
 
-  AddonManager.getAddons(["bug470377_1@tests.mozilla.org",
-                          "bug470377_2@tests.mozilla.org",
-                          "bug470377_3@tests.mozilla.org",
-                          "bug470377_4@tests.mozilla.org",
-                          "bug470377_5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org",
+                               "bug470377_2@tests.mozilla.org",
+                               "bug470377_3@tests.mozilla.org",
+                               "bug470377_4@tests.mozilla.org",
+                               "bug470377_5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     do_check_neq(a1, null);
     do_check_false(a1.isActive);
     do_check_neq(a2, null);
     do_check_true(a2.isActive);
     do_check_neq(a3, null);
     do_check_true(a3.isActive);
     do_check_neq(a4, null);
     do_check_true(a4.isActive);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_4.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug470377_4.js
@@ -75,22 +75,22 @@ function run_test() {
   run_test_1();
 }
 
 function run_test_1() {
   // Disable compatibility checks
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.1a", false);
   startupManager();
 
-  AddonManager.getAddons(["bug470377_1@tests.mozilla.org",
-                          "bug470377_2@tests.mozilla.org",
-                          "bug470377_3@tests.mozilla.org",
-                          "bug470377_4@tests.mozilla.org",
-                          "bug470377_5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org",
+                               "bug470377_2@tests.mozilla.org",
+                               "bug470377_3@tests.mozilla.org",
+                               "bug470377_4@tests.mozilla.org",
+                               "bug470377_5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     do_check_neq(a1, null);
     do_check_false(a1.isActive);
     do_check_neq(a2, null);
     do_check_true(a2.isActive);
     do_check_neq(a3, null);
     do_check_true(a3.isActive);
     do_check_neq(a4, null);
     do_check_true(a4.isActive);
@@ -101,22 +101,22 @@ function run_test_1() {
   });
 }
 
 function run_test_2() {
   // Enable compatibility checks
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.1a", true);
   restartManager();
 
-  AddonManager.getAddons(["bug470377_1@tests.mozilla.org",
-                          "bug470377_2@tests.mozilla.org",
-                          "bug470377_3@tests.mozilla.org",
-                          "bug470377_4@tests.mozilla.org",
-                          "bug470377_5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["bug470377_1@tests.mozilla.org",
+                               "bug470377_2@tests.mozilla.org",
+                               "bug470377_3@tests.mozilla.org",
+                               "bug470377_4@tests.mozilla.org",
+                               "bug470377_5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     do_check_neq(a1, null);
     do_check_false(a1.isActive);
     do_check_neq(a2, null);
     do_check_false(a2.isActive);
     do_check_neq(a3, null);
     do_check_false(a3.isActive);
     do_check_neq(a4, null);
     do_check_true(a4.isActive);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug521905.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug521905.js
@@ -47,40 +47,40 @@ Services.prefs.setBoolPref("extensions.c
 function run_test() {
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "2.0pre", "2");
 
   startupManager();
   installAllFiles([do_get_addon(ADDON)], function() {
     restartManager();
 
-    AddonManager.getAddon(ID, function(addon) {
+    AddonManager.getAddonByID(ID, function(addon) {
       do_check_neq(addon, null);
       do_check_true(addon.isActive);
 
       run_test_1();
     });
   });
 }
 
 function run_test_1() {
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.0pre", true);
 
   restartManager();
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     do_check_false(addon.isActive);
 
     run_test_2();
   });
 }
 
 function run_test_2() {
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.0p", false);
 
   restartManager();
-  AddonManager.getAddon(ID, function(addon) {
+  AddonManager.getAddonByID(ID, function(addon) {
     do_check_neq(addon, null);
     do_check_false(addon.isActive);
 
     do_test_finished();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug526598.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug526598.js
@@ -44,19 +44,19 @@ function run_test() {
 
   startupManager();
 
   installAllFiles([do_get_file("data/test_bug526598_1.xpi"),
                    do_get_file("data/test_bug526598_2.xpi")], function() {
 
     restartManager();
 
-    AddonManager.getAddons(["bug526598_1@tests.mozilla.org",
-                            "bug526598_2@tests.mozilla.org"],
-                            function([a1, a2]) {
+    AddonManager.getAddonsByIDs(["bug526598_1@tests.mozilla.org",
+                                 "bug526598_2@tests.mozilla.org"],
+                                 function([a1, a2]) {
 
       do_check_neq(a1, null);
       do_check_true(a1.hasResource("install.rdf"));
       let uri = Services.io.newURI(a1.getResourceURL("install.rdf"), "UTF-8", null);
       do_check_true(uri instanceof AM_Ci.nsIFileURL);
       let file = uri.file;
       do_check_true(file.exists());
       do_check_true(file.isReadable());
@@ -71,19 +71,19 @@ function run_test() {
       do_check_true(file.isReadable());
       do_check_true(file.isWritable());
 
       a1.uninstall();
       a2.uninstall();
 
       restartManager();
 
-      AddonManager.getAddons(["bug526598_1@tests.mozilla.org",
-                              "bug526598_2@tests.mozilla.org"],
-                              function([newa1, newa2]) {
+      AddonManager.getAddonsByIDs(["bug526598_1@tests.mozilla.org",
+                                   "bug526598_2@tests.mozilla.org"],
+                                   function([newa1, newa2]) {
         do_check_eq(newa1, null);
         do_check_eq(newa2, null);
 
         do_test_finished();
       });
     });
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug541420.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug541420.js
@@ -42,17 +42,17 @@ function run_test() {
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
 
   startupManager();
 
   installAllFiles([do_get_file("data/test_bug541420.xpi")], function() {
 
     restartManager();
 
-    AddonManager.getAddon("bug541420@tests.mozilla.org", function(addon) {
+    AddonManager.getAddonByID("bug541420@tests.mozilla.org", function(addon) {
 
       do_check_neq(addon, null);
       do_check_true(addon.hasResource("binary"));
       let uri = Services.io.newURI(addon.getResourceURL("binary"), "UTF-8", null);
       do_check_true(uri instanceof AM_Ci.nsIFileURL);
       let file = uri.file;
       do_check_true(file.exists());
       do_check_true(file.isReadable());
--- a/toolkit/mozapps/extensions/test/xpcshell/test_checkcompatibility.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_checkcompatibility.js
@@ -115,73 +115,73 @@ function check_state(overridden, a1, a2,
   do_check_neq(a5, null);
   do_check_true(a5.isActive);
   do_check_true(a5.isCompatible);
 }
 
 // Tests that with compatibility checking enabled we see the incompatible
 // add-ons disabled
 function run_test_1() {
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     check_state(false, a1, a2, a3, a4, a5);
 
     run_test_2();
   });
 }
 
 // Tests that with compatibility checking disabled we see the incompatible
 // add-ons enabled
 function run_test_2() {
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.2", false);
   restartManager(0);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     check_state(true, a1, a2, a3, a4, a5);
 
     run_test_3();
   });
 }
 
 // Tests that with compatibility checking disabled we see the incompatible
 // add-ons enabled.
 function run_test_3() {
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.1a", false);
   restartManager(1, "2.1a4");
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     check_state(true, a1, a2, a3, a4, a5);
 
     run_test_4();
   });
 }
 
 // Tests that with compatibility checking enabled we see the incompatible
 // add-ons disabled.
 function run_test_4() {
   Services.prefs.setBoolPref("extensions.checkCompatibility.2.1a", true);
   restartManager(0);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
     check_state(false, a1, a2, a3, a4, a5);
 
     do_test_finished();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_disable.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_disable.js
@@ -21,27 +21,27 @@ profileDir.append("extensions");
 
 // Sets up the profile by installing an add-on.
 function run_test() {
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
 
   startupManager(1);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_eq(a1, null);
     do_check_not_in_crash_annotation(addon1.id, addon1.version);
 
     var dest = profileDir.clone();
     dest.append("addon1@tests.mozilla.org");
     writeInstallRDFToDir(addon1, dest);
 
     restartManager(1);
 
-    AddonManager.getAddon("addon1@tests.mozilla.org", function(newa1) {
+    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(newa1) {
       do_check_neq(newa1, null);
       do_check_true(newa1.isActive);
       do_check_false(newa1.userDisabled);
       do_check_eq(newa1.iconURL, "chrome://foo/content/icon.png");
       do_check_true(isExtensionInAddonsList(profileDir, newa1.id));
       do_check_true(hasFlag(newa1.permissions, AddonManager.PERM_CAN_DISABLE));
       do_check_false(hasFlag(newa1.permissions, AddonManager.PERM_CAN_ENABLE));
       do_check_in_crash_annotation(addon1.id, addon1.version);
@@ -54,31 +54,31 @@ function run_test() {
 // Disabling an add-on should work
 function run_test_1() {
   prepare_test({
     "addon1@tests.mozilla.org": [
       "onDisabling"
     ]
   });
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     a1.userDisabled = true;
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_DISABLE));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_ENABLE));
     do_check_in_crash_annotation(addon1.id, addon1.version);
 
     ensure_test_completed();
 
-    AddonManager.getAddonsWithPendingOperations(null, function(list) {
+    AddonManager.getAddonsWithOperationsByTypes(null, function(list) {
       do_check_eq(list.length, 1);
       do_check_eq(list[0].id, "addon1@tests.mozilla.org");
 
       restartManager(0);
 
-      AddonManager.getAddon("addon1@tests.mozilla.org", function(newa1) {
+      AddonManager.getAddonByID("addon1@tests.mozilla.org", function(newa1) {
         do_check_neq(newa1, null);
         do_check_false(newa1.isActive);
         do_check_true(newa1.userDisabled);
         do_check_eq(newa1.iconURL, null);
         do_check_false(isExtensionInAddonsList(profileDir, newa1.id));
         do_check_false(hasFlag(newa1.permissions, AddonManager.PERM_CAN_DISABLE));
         do_check_true(hasFlag(newa1.permissions, AddonManager.PERM_CAN_ENABLE));
         do_check_not_in_crash_annotation(addon1.id, addon1.version);
@@ -92,30 +92,30 @@ function run_test_1() {
 // Enabling an add-on should work.
 function run_test_2() {
   prepare_test({
     "addon1@tests.mozilla.org": [
       "onEnabling"
     ]
   });
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     a1.userDisabled = false;
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_DISABLE));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_ENABLE));
 
     ensure_test_completed();
 
-    AddonManager.getAddonsWithPendingOperations(null, function(list) {
+    AddonManager.getAddonsWithOperationsByTypes(null, function(list) {
       do_check_eq(list.length, 1);
       do_check_eq(list[0].id, "addon1@tests.mozilla.org");
 
       restartManager(0);
 
-      AddonManager.getAddon("addon1@tests.mozilla.org", function(newa1) {
+      AddonManager.getAddonByID("addon1@tests.mozilla.org", function(newa1) {
         do_check_neq(newa1, null);
         do_check_true(newa1.isActive);
         do_check_false(newa1.userDisabled);
         do_check_true(isExtensionInAddonsList(profileDir, newa1.id));
         do_check_true(hasFlag(newa1.permissions, AddonManager.PERM_CAN_DISABLE));
         do_check_false(hasFlag(newa1.permissions, AddonManager.PERM_CAN_ENABLE));
         do_check_in_crash_annotation(addon1.id, addon1.version);
 
@@ -128,33 +128,33 @@ function run_test_2() {
 // Disabling then enabling withut restart should fire onOperationCancelled.
 function run_test_3() {
   prepare_test({
     "addon1@tests.mozilla.org": [
       "onDisabling"
     ]
   });
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     a1.userDisabled = true;
     ensure_test_completed();
     prepare_test({
       "addon1@tests.mozilla.org": [
         "onOperationCancelled"
       ]
     });
     a1.userDisabled = false;
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_DISABLE));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_ENABLE));
 
     ensure_test_completed();
 
     restartManager(0);
 
-    AddonManager.getAddon("addon1@tests.mozilla.org", function(newa1) {
+    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(newa1) {
       do_check_neq(newa1, null);
       do_check_true(newa1.isActive);
       do_check_false(newa1.userDisabled);
       do_check_true(isExtensionInAddonsList(profileDir, newa1.id));
       do_check_true(hasFlag(newa1.permissions, AddonManager.PERM_CAN_DISABLE));
       do_check_false(hasFlag(newa1.permissions, AddonManager.PERM_CAN_ENABLE));
 
       do_test_finished();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_fuel.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_fuel.js
@@ -102,17 +102,17 @@ function run_test() {
     do_check_true(inspector.storage.has("test"));
     do_check_eq(inspector2.storage.get("test", "cache"), inspector.storage.get("test", "original"));
 
     inspector.events.addListener("disable", onGenericEvent);
     inspector.events.addListener("enable", onGenericEvent);
     inspector.events.addListener("uninstall", onGenericEvent);
     inspector.events.addListener("cancel", onGenericEvent);
 
-    AddonManager.getAddon(testdata.inspectorid, function(a) {
+    AddonManager.getAddonByID(testdata.inspectorid, function(a) {
       a.userDisabled = true;
 
       do_check_eq(gLastEvent, "disable");
 
       // enabling after a disable will only fire a 'cancel' event
       // see - http://mxr.mozilla.org/seamonkey/source/toolkit/mozapps/extensions/src/nsExtensionManager.js.in#5216
       a.userDisabled = false;
       do_check_eq(gLastEvent, "cancel");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_general.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_general.js
@@ -23,17 +23,17 @@ function run_test() {
 }
 
 function run_test_1() {
   restartManager(0);
 
   AddonManager.getAddonsByTypes(null, function(addons) {
     do_check_eq(gCount, addons.length);
 
-    AddonManager.getAddonsWithPendingOperations(null, function(pendingAddons) {
+    AddonManager.getAddonsWithOperationsByTypes(null, function(pendingAddons) {
       do_check_eq(0, pendingAddons.length);
 
       run_test_2();
     });
   });
 }
 
 function run_test_2() {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
@@ -56,24 +56,24 @@ function run_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);
 
     let file = do_get_addon("test_install1");
     let uri = Services.io.newFileURI(file).spec;
     do_check_eq(install.addon.getResourceURL("install.rdf"), "jar:" + uri + "!/install.rdf");
 
-    AddonManager.getInstalls(null, function(activeInstalls) {
+    AddonManager.getAllInstalls(function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
       do_check_eq(activeInstalls[0], install);
 
-      AddonManager.getInstalls(["foo"], function(fooInstalls) {
+      AddonManager.getInstallsByTypes(["foo"], function(fooInstalls) {
         do_check_eq(fooInstalls.length, 0);
 
-        AddonManager.getInstalls(["extension"], function(extensionInstalls) {
+        AddonManager.getInstallsByTypes(["extension"], function(extensionInstalls) {
           do_check_eq(extensionInstalls.length, 1);
           do_check_eq(extensionInstalls[0], install);
 
           prepare_test({
             "addon1@tests.mozilla.org": [
               "onInstalling"
             ]
           }, [
@@ -84,29 +84,29 @@ function run_test_1() {
         });
       });
     });
   });
 }
 
 function check_test_1() {
   ensure_test_completed();
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(olda1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(olda1) {
     do_check_eq(olda1, null);
 
-    AddonManager.getAddonsWithPendingOperations(null, function(pendingAddons) {
+    AddonManager.getAddonsWithOperationsByTypes(null, function(pendingAddons) {
       do_check_eq(pendingAddons.length, 1);
       do_check_eq(pendingAddons[0].id, "addon1@tests.mozilla.org");
 
       restartManager(1);
 
-      AddonManager.getInstalls(null, function(activeInstalls) {
+      AddonManager.getAllInstalls(function(activeInstalls) {
         do_check_eq(activeInstalls, 0);
 
-        AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+        AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
           do_check_neq(a1, null);
           do_check_eq(a1.type, "extension");
           do_check_eq(a1.version, "1.0");
           do_check_eq(a1.name, "Test 1");
           do_check_true(isExtensionInAddonsList(profileDir, a1.id));
           do_check_true(do_get_addon("test_install1").exists());
           do_check_in_crash_annotation(a1.id, a1.version);
 
@@ -143,17 +143,17 @@ function check_test_1() {
 function run_test_2() {
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(install) {
     do_check_neq(install, null);
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Test 2");
     do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
 
-    AddonManager.getInstalls(null, function(activeInstalls) {
+    AddonManager.getAllInstalls(function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
       do_check_eq(activeInstalls[0], install);
 
       prepare_test({}, [
         "onDownloadStarted",
         "onDownloadEnded",
       ], check_test_2);
 
@@ -192,24 +192,24 @@ function run_test_3(install) {
     "onInstallStarted",
     "onInstallEnded",
   ], check_test_3);
   install.install();
 }
 
 function check_test_3() {
   ensure_test_completed();
-  AddonManager.getAddon("addon2@tests.mozilla.org", function(olda2) {
+  AddonManager.getAddonByID("addon2@tests.mozilla.org", function(olda2) {
     do_check_eq(olda2, null);
     restartManager(1);
 
-    AddonManager.getInstalls(null, function(installs) {
+    AddonManager.getAllInstalls(function(installs) {
       do_check_eq(installs, 0);
 
-      AddonManager.getAddon("addon2@tests.mozilla.org", function(a2) {
+      AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
         do_check_neq(a2, null);
         do_check_eq(a2.type, "extension");
         do_check_eq(a2.version, "2.0");
         do_check_eq(a2.name, "Real Test 2");
         do_check_true(isExtensionInAddonsList(profileDir, a2.id));
         do_check_true(do_get_addon("test_install2_1").exists());
         do_check_in_crash_annotation(a2.id, a2.version);
 
@@ -239,17 +239,17 @@ function run_test_4() {
   AddonManager.getInstallForURL(url, function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.version, "3.0");
     do_check_eq(install.name, "Test 3");
     do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
 
-    AddonManager.getInstalls(null, function(activeInstalls) {
+    AddonManager.getAllInstalls(function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
       do_check_eq(activeInstalls[0], install);
       do_check_eq(install.existingAddon, null);
 
       prepare_test({}, [
         "onDownloadStarted",
         "onDownloadEnded",
       ], check_test_4);
@@ -284,29 +284,29 @@ function run_test_5() {
   ], check_test_5);
 }
 
 function check_test_5(install) {
   ensure_test_completed();
 
   do_check_eq(install.existingAddon.pendingUpgrade.install, install);
 
-  AddonManager.getAddon("addon2@tests.mozilla.org", function(olda2) {
+  AddonManager.getAddonByID("addon2@tests.mozilla.org", function(olda2) {
     do_check_neq(olda2, null);
     do_check_true(hasFlag(olda2.pendingOperations, AddonManager.PENDING_UPGRADE));
 
-    AddonManager.getInstalls(null, function(installs) {
+    AddonManager.getInstallsByTypes(null, function(installs) {
       do_check_eq(installs.length, 1);
       do_check_eq(installs[0].addon, olda2.pendingUpgrade);
       restartManager();
 
-      AddonManager.getInstalls(null, function(installs) {
+      AddonManager.getInstallsByTypes(null, function(installs) {
         do_check_eq(installs.length, 0);
 
-        AddonManager.getAddon("addon2@tests.mozilla.org", function(a2) {
+        AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_neq(a2, null);
           do_check_eq(a2.type, "extension");
           do_check_eq(a2.version, "3.0");
           do_check_eq(a2.name, "Real Test 3");
           do_check_true(a2.isActive);
           do_check_true(isExtensionInAddonsList(profileDir, a2.id));
           do_check_true(do_get_addon("test_install2_2").exists());
           do_check_in_crash_annotation(a2.id, a2.version);
@@ -335,17 +335,17 @@ function run_test_6() {
   AddonManager.getInstallForURL(url, function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Real Test 4");
     do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
 
-    AddonManager.getInstalls(null, function(activeInstalls) {
+    AddonManager.getInstallsByTypes(null, function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
       do_check_eq(activeInstalls[0], install);
 
       prepare_test({}, [
         "onDownloadStarted",
         "onDownloadEnded",
       ], check_test_6);
       install.install();
@@ -373,24 +373,24 @@ function run_test_7() {
   }, [
     "onInstallStarted",
     "onInstallEnded",
   ], check_test_7);
 }
 
 function check_test_7() {
   ensure_test_completed();
-  AddonManager.getAddon("addon3@tests.mozilla.org", function(olda3) {
+  AddonManager.getAddonByID("addon3@tests.mozilla.org", function(olda3) {
     do_check_eq(olda3, null);
     restartManager();
 
-    AddonManager.getInstalls(null, function(installs) {
+    AddonManager.getAllInstalls(function(installs) {
       do_check_eq(installs, 0);
 
-      AddonManager.getAddon("addon3@tests.mozilla.org", function(a3) {
+      AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
         do_check_neq(a3, null);
         do_check_eq(a3.type, "extension");
         do_check_eq(a3.version, "1.0");
         do_check_eq(a3.name, "Real Test 4");
         do_check_true(a3.isActive);
         do_check_false(a3.appDisabled);
         do_check_true(isExtensionInAddonsList(profileDir, a3.id));
         do_check_true(do_get_addon("test_install3").exists());
@@ -424,17 +424,17 @@ function run_test_8() {
     ], check_test_8);
     install.install();
   });
 }
 
 function check_test_8() {
   restartManager(1);
 
-  AddonManager.getAddon("addon3@tests.mozilla.org", function(a3) {
+  AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
     do_check_neq(a3, null);
     do_check_eq(a3.type, "extension");
     do_check_eq(a3.version, "1.0");
     do_check_eq(a3.name, "Real Test 4");
     do_check_true(a3.isActive);
     do_check_false(a3.appDisabled);
     do_check_true(isExtensionInAddonsList(profileDir, a3.id));
     do_check_true(do_get_addon("test_install3").exists());
@@ -455,17 +455,17 @@ function run_test_9() {
   AddonManager.getInstallForURL(url, function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Real Test 4");
     do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
 
-    AddonManager.getInstalls(null, function(activeInstalls) {
+    AddonManager.getInstallsByTypes(null, function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
       do_check_eq(activeInstalls[0], install);
 
       prepare_test({}, [
         "onDownloadStarted",
         "onDownloadEnded",
       ], check_test_9);
       install.install();
@@ -477,17 +477,17 @@ function check_test_9(install) {
   prepare_test({}, [
     "onDownloadCancelled"
   ]);
 
   install.cancel();
 
   ensure_test_completed();
 
-  AddonManager.getInstalls(null, function(activeInstalls) {
+  AddonManager.getAllInstalls(function(activeInstalls) {
     do_check_eq(activeInstalls.length, 0);
 
     run_test_10();
   });
 }
 
 // Tests that after cancelling a pending install it is removed from the active
 // installs
@@ -500,17 +500,17 @@ function run_test_10() {
   AddonManager.getInstallForURL(url, function(install) {
     ensure_test_completed();
 
     do_check_neq(install, null);
     do_check_eq(install.version, "1.0");
     do_check_eq(install.name, "Real Test 4");
     do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
 
-    AddonManager.getInstalls(null, function(activeInstalls) {
+    AddonManager.getInstallsByTypes(null, function(activeInstalls) {
       do_check_eq(activeInstalls.length, 1);
       do_check_eq(activeInstalls[0], install);
 
       prepare_test({
         "addon3@tests.mozilla.org": [
           "onInstalling"
         ]
       }, [
@@ -528,14 +528,14 @@ function check_test_10(install) {
   prepare_test({}, [
     "onInstallCancelled"
   ]);
 
   install.cancel();
 
   ensure_test_completed();
 
-  AddonManager.getInstalls(null, function(activeInstalls) {
+  AddonManager.getAllInstalls(function(activeInstalls) {
     do_check_eq(activeInstalls.length, 0);
 
     end_test();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_locale.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_locale.js
@@ -38,47 +38,47 @@ function run_test_1() {
     install.install();
   });
 }
 
 // Tests that the localized properties are visible after installation
 function run_test_2() {
   restartManager(1);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(addon) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
 
     do_check_eq(addon.name, "fr-FR Name");
     do_check_eq(addon.description, "fr-FR Description");
 
     addon.userDisabled = true;
     restartManager(0);
 
     run_test_3();
   });
 }
 
 // Test that the localized properties are still there when disabled.
 function run_test_3() {
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(addon) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
     do_check_eq(addon.name, "fr-FR Name");
 
     run_test_4();
   });
 }
 
 // Localised preference values should be ignored when the add-on is disabled
 function run_test_4() {
   Services.prefs.setCharPref("extensions.addon1@tests.mozilla.org.name", "Name from prefs");
   Services.prefs.setCharPref("extensions.addon1@tests.mozilla.org.contributor.1", "Contributor 1");
   Services.prefs.setCharPref("extensions.addon1@tests.mozilla.org.contributor.2", "Contributor 2");
   restartManager(0);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(addon) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
     do_check_eq(addon.name, "fr-FR Name");
     let contributors = addon.contributors;
     do_check_eq(contributors.length, 3);
     do_check_eq(contributors[0], "Fr Contributor 1");
     do_check_eq(contributors[1], "Fr Contributor 2");
     do_check_eq(contributors[2], "Fr Contributor 3");
 
@@ -86,60 +86,60 @@ function run_test_4() {
   });
 }
 
 // Test that changing locale works
 function run_test_5() {
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "de-DE");
   restartManager(0);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(addon) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
 
     do_check_eq(addon.name, "de-DE Name");
     do_check_eq(addon.description, null);
 
     run_test_6();
   });
 }
 
 // Test that missing locales use the fallbacks
 function run_test_6() {
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "nl-NL");
   restartManager(0);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(addon) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
 
     do_check_eq(addon.name, "Fallback Name");
     do_check_eq(addon.description, "Fallback Description");
 
     addon.userDisabled = false;
     restartManager(0);
     run_test_7();
   });
 }
 
 // Test that the prefs will override the fallbacks
 function run_test_7() {
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(addon) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
 
     do_check_eq(addon.name, "Name from prefs");
 
     run_test_8();
   });
 }
 
 // Test that the prefs will override localized values from the manifest
 function run_test_8() {
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "fr-FR");
   restartManager(0);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(addon) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
 
     do_check_eq(addon.name, "Name from prefs");
     let contributors = addon.contributors;
     do_check_eq(contributors.length, 2);
     do_check_eq(contributors[0], "Contributor 1");
     do_check_eq(contributors[1], "Contributor 2");
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_manifest.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_manifest.js
@@ -249,34 +249,34 @@ function run_test() {
       minVersion: "1",
       maxVersion: "1"
     }],
     name: "Test Addon 16"
   }, dest);
 
   do_test_pending();
   startupManager(1);
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org",
-                          "addon6@tests.mozilla.org",
-                          "addon7@tests.mozilla.org",
-                          "addon8@tests.mozilla.org",
-                          "addon9@tests.mozilla.org",
-                          "addon10@tests.mozilla.org",
-                          "addon11@tests.mozilla.org",
-                          "addon12@tests.mozilla.org",
-                          "addon13@tests.mozilla.org",
-                          "addon14@tests.mozilla.org",
-                          "addon15@tests.mozilla.org",
-                          "addon16@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-                                    a11, a12, a13, a14, a15, a16]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org",
+                               "addon6@tests.mozilla.org",
+                               "addon7@tests.mozilla.org",
+                               "addon8@tests.mozilla.org",
+                               "addon9@tests.mozilla.org",
+                               "addon10@tests.mozilla.org",
+                               "addon11@tests.mozilla.org",
+                               "addon12@tests.mozilla.org",
+                               "addon13@tests.mozilla.org",
+                               "addon14@tests.mozilla.org",
+                               "addon15@tests.mozilla.org",
+                               "addon16@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
+                                         a11, a12, a13, a14, a15, a16]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.type, "extension");
     do_check_eq(a1.version, "1.0");
     do_check_eq(a1.optionsURL, "chrome://test/content/options.xul");
     do_check_eq(a1.aboutURL, "chrome://test/content/about.xul");
     do_check_eq(a1.iconURL, "chrome://test/skin/icon.png");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js
@@ -67,20 +67,20 @@ function run_test() {
   dest = profileDir.clone();
   dest.append("addon4@tests.mozilla.org");
   writeInstallRDFToDir(addon4, dest);
 
   let old = do_get_file("data/test_migrate.rdf");
   old.copyTo(gProfD, "extensions.rdf");
 
   startupManager(1);
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org"], function([a1, a2, a3, a4]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org"], function([a1, a2, a3, a4]) {
     // addon1 was enabled in the old extensions.rdf
     do_check_neq(a1, null);
     do_check_false(a1.userDisabled);
     // addon1 was disabled in the old extensions.rdf
     do_check_neq(a2, null);
     do_check_true(a2.userDisabled);
     // addon1 was pending-disable in the old extensions.rdf
     do_check_neq(a3, null);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_migrate2.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_migrate2.js
@@ -92,20 +92,20 @@ function run_test() {
     stmt.params.installDate = a[4];
     stmt.execute();
   });
   stmt.finalize();
   db.close();
   Services.prefs.setIntPref("extensions.databaseSchema", 100);
 
   startupManager(1);
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org"], function([a1, a2, a3, a4]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org"], function([a1, a2, a3, a4]) {
     // addon1 was enabled in the database
     do_check_neq(a1, null);
     do_check_false(a1.userDisabled);
     // addon1 was disabled in the database
     do_check_neq(a2, null);
     do_check_true(a2.userDisabled);
     // addon1 was pending-disable in the database
     do_check_neq(a3, null);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
@@ -23,17 +23,17 @@ function run_test_1() {
 
     addons.forEach(function(p) {
       if (p.name == "Test Plug-in")
         gID = p.id;
     });
 
     do_check_neq(gID, null);
 
-    AddonManager.getAddon(gID, function(p) {
+    AddonManager.getAddonByID(gID, function(p) {
       do_check_neq(p, null)
       do_check_false(p.userDisabled);
       do_check_false(p.appDisabled);
       do_check_true(p.isActive);
       do_check_eq(p.name, "Test Plug-in");
 
       run_test_2(p);
     });
@@ -52,17 +52,17 @@ function run_test_2(p) {
   p.userDisabled = true;
 
   ensure_test_completed();
 
   do_check_true(p.userDisabled);
   do_check_false(p.appDisabled);
   do_check_false(p.isActive);
 
-  AddonManager.getAddon(gID, function(p) {
+  AddonManager.getAddonByID(gID, function(p) {
     do_check_neq(p, null)
     do_check_true(p.userDisabled);
     do_check_false(p.appDisabled);
     do_check_false(p.isActive);
     do_check_eq(p.name, "Test Plug-in");
 
     run_test_3(p);
   });
@@ -80,17 +80,17 @@ function run_test_3(p) {
   p.userDisabled = false;
 
   ensure_test_completed();
 
   do_check_false(p.userDisabled);
   do_check_false(p.appDisabled);
   do_check_true(p.isActive);
 
-  AddonManager.getAddon(gID, function(p) {
+  AddonManager.getAddonByID(gID, function(p) {
     do_check_neq(p, null)
     do_check_false(p.userDisabled);
     do_check_false(p.appDisabled);
     do_check_true(p.isActive);
     do_check_eq(p.name, "Test Plug-in");
 
     do_test_finished();
   });
--- a/toolkit/mozapps/extensions/test/xpcshell/test_registry.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_registry.js
@@ -55,18 +55,18 @@ function run_test_1() {
                         "SOFTWARE\\Mozilla\\XPCShell\\Extensions",
                         "addon1@tests.mozilla.org", addon1Dir.path);
   MockRegistry.setValue(AM_Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
                         "SOFTWARE\\Mozilla\\XPCShell\\Extensions",
                         "addon2@tests.mozilla.org", addon2Dir.path);
 
   startupManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org"], function([a1, a2]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org"], function([a1, a2]) {
     do_check_neq(a1, null);
     do_check_true(a1.isActive);
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_eq(a1.scope, AddonManager.SCOPE_SYSTEM);
 
     do_check_neq(a2, null);
     do_check_true(a2.isActive);
     do_check_false(hasFlag(a2.permissions, AddonManager.PERM_CAN_UNINSTALL));
@@ -82,18 +82,18 @@ function run_test_2() {
                         "SOFTWARE\\Mozilla\\XPCShell\\Extensions",
                         "addon1@tests.mozilla.org", null);
   MockRegistry.setValue(AM_Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
                         "SOFTWARE\\Mozilla\\XPCShell\\Extensions",
                         "addon2@tests.mozilla.org", null);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org"], function([a1, a2]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org"], function([a1, a2]) {
     do_check_eq(a1, null);
     do_check_eq(a2, null);
 
     run_test_3();
   });
 }
 
 // Checks that the ID in the registry must match that in the install manifest
@@ -102,18 +102,18 @@ function run_test_3() {
                         "SOFTWARE\\Mozilla\\XPCShell\\Extensions",
                         "addon1@tests.mozilla.org", addon2Dir.path);
   MockRegistry.setValue(AM_Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
                         "SOFTWARE\\Mozilla\\XPCShell\\Extensions",
                         "addon2@tests.mozilla.org", addon1Dir.path);
 
   restartManager(0);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org"], function([a1, a2]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org"], function([a1, a2]) {
     do_check_eq(a1, null);
     do_check_eq(a2, null);
 
     // Restarting with bad items in the registry should not force an EM restart
     restartManager(0);
 
     run_test_4();
   });
@@ -140,16 +140,16 @@ function run_test_4() {
                         "addon1@tests.mozilla.org", null);
   MockRegistry.setValue(AM_Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
                         "SOFTWARE\\Mozilla\\XPCShell\\Extensions",
                         "addon2@tests.mozilla.org", addon1Dir.path);
   writeInstallRDFToDir(addon2, addon1Dir);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org"], function([a1, a2]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org"], function([a1, a2]) {
     do_check_eq(a1, null);
     do_check_neq(a2, null);
 
     do_test_finished();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_startup.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_startup.js
@@ -78,22 +78,22 @@ registerDirectory("XREUSysExt", userDir.
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Set up the profile
 function run_test() {
   do_test_pending();
   startupManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_eq(a1, null);
     do_check_not_in_crash_annotation(addon1.id, addon1.version);
     do_check_eq(a2, null);
     do_check_not_in_crash_annotation(addon2.id, addon2.version);
     do_check_eq(a3, null);
     do_check_not_in_crash_annotation(addon3.id, addon3.version);
     do_check_eq(a4, null);
@@ -124,22 +124,22 @@ function run_test_1() {
   dest = profileDir.clone();
   dest.append("addon4@tests.mozilla.org");
   writeInstallRDFToDir(addon4, dest);
   dest = profileDir.clone();
   dest.append("addon5@tests.mozilla.org");
   writeInstallRDFToDir(addon5, dest);
 
   restartManager(1);
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.0");
     do_check_eq(a1.name, "Test 1");
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -206,22 +206,22 @@ function run_test_2() {
   addon2.version="2.3";
   writeInstallRDFToDir(addon2, dest);
   dest = profileDir.clone();
   dest.append("addon3@tests.mozilla.org");
   dest.remove(true);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.0");
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
     do_check_false(isExtensionInAddonsList(userDir, a1.id));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -262,22 +262,22 @@ function run_test_3() {
   dest.append("addon2@tests.mozilla.org");
   dest.remove(true);
   dest = profileDir.clone();
   dest.append("addon4@tests.mozilla.org");
   writeInstallRDFToDir(addon3, dest);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.1");
     do_check_false(isExtensionInAddonsList(profileDir, a1.id));
     do_check_true(isExtensionInAddonsList(userDir, a1.id));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -313,22 +313,22 @@ function run_test_3() {
 }
 
 // Test that disabling an install location works
 function run_test_4() {
   Services.prefs.setIntPref("extensions.enabledScopes", AddonManager.SCOPE_SYSTEM);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_eq(a1, null);
     do_check_false(isExtensionInAddonsList(profileDir, "addon1@tests.mozilla.org"));
     do_check_false(isExtensionInAddonsList(userDir, "addon1@tests.mozilla.org"));
 
     do_check_neq(a2, null);
     do_check_eq(a2.id, "addon2@tests.mozilla.org");
     do_check_eq(a2.version, "2.2");
@@ -345,22 +345,22 @@ function run_test_4() {
 }
 
 // Switching disabled locations works
 function run_test_5() {
   Services.prefs.setIntPref("extensions.enabledScopes", AddonManager.SCOPE_USER);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.1");
     do_check_false(isExtensionInAddonsList(profileDir, a1.id));
     do_check_true(isExtensionInAddonsList(userDir, a1.id));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -383,22 +383,22 @@ function run_test_5() {
 }
 
 // Resetting the pref makes everything visible again
 function run_test_6() {
   Services.prefs.clearUserPref("extensions.enabledScopes");
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.1");
     do_check_false(isExtensionInAddonsList(profileDir, a1.id));
     do_check_true(isExtensionInAddonsList(userDir, a1.id));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -427,22 +427,22 @@ function run_test_7() {
   addon1.version = "1.2";
   writeInstallRDFToDir(addon1, dest);
   dest = userDir.clone();
   dest.append("addon2@tests.mozilla.org");
   dest.remove(true);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.2");
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
     do_check_false(isExtensionInAddonsList(userDir, a1.id));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -474,22 +474,22 @@ function run_test_7() {
 }
 
 // Disabling all locations still leaves the profile working
 function run_test_8() {
   Services.prefs.setIntPref("extensions.enabledScopes", 0);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.2");
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
     do_check_false(isExtensionInAddonsList(userDir, a1.id));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -517,22 +517,22 @@ function run_test_9() {
   dest.remove(true);
   dest = profileDir.clone();
   dest.append("addon2@tests.mozilla.org");
   addon2.version = "2.4";
   writeInstallRDFToDir(addon2, dest);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.2");
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
     do_check_false(isExtensionInAddonsList(userDir, a1.id));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -569,22 +569,22 @@ function run_test_10() {
   dest.remove(true);
   dest = userDir.clone();
   dest.append("addon1@tests.mozilla.org");
   addon1.version = "1.3";
   writeInstallRDFToDir(addon1, dest);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_neq(a1, null);
     do_check_eq(a1.id, "addon1@tests.mozilla.org");
     do_check_eq(a1.version, "1.3");
     do_check_false(isExtensionInAddonsList(profileDir, a1.id));
     do_check_true(isExtensionInAddonsList(userDir, a1.id));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UNINSTALL));
     do_check_false(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
@@ -619,22 +619,22 @@ function run_test_11() {
   dest.append("addon1@tests.mozilla.org");
   dest.remove(true);
   dest = profileDir.clone();
   dest.append("addon2@tests.mozilla.org");
   dest.remove(true);
 
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org",
-                          "addon4@tests.mozilla.org",
-                          "addon5@tests.mozilla.org"],
-                          function([a1, a2, a3, a4, a5]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org",
+                               "addon4@tests.mozilla.org",
+                               "addon5@tests.mozilla.org"],
+                               function([a1, a2, a3, a4, a5]) {
 
     do_check_eq(a1, null);
     do_check_eq(a2, null);
     do_check_eq(a3, null);
     do_check_eq(a4, null);
     do_check_eq(a5, null);
     do_check_false(isExtensionInAddonsList(profileDir, "addon1@tests.mozilla.org"));
     do_check_false(isExtensionInAddonsList(profileDir, "addon2@tests.mozilla.org"));
--- a/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
@@ -66,17 +66,18 @@ function run_test() {
   startupManager(1);
   // Make sure we only register once despite multiple calls
   AddonManager.addInstallListener(InstallListener);
   AddonManager.addAddonListener(AddonListener);
   AddonManager.addInstallListener(InstallListener);
   AddonManager.addAddonListener(AddonListener);
   AddonManager.addInstallListener(InstallListener);
 
-  AddonManager.getAddons(["theme1@tests.mozilla.org", "theme2@tests.mozilla.org"], function([t1, t2]) {
+  AddonManager.getAddonsByIDs(["theme1@tests.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([t1, t2]) {
     do_check_neq(t1, null);
     do_check_false(t1.userDisabled);
     do_check_false(t1.appDisabled);
     do_check_true(t1.isActive);
     do_check_true(isThemeInAddonsList(profileDir, t1.id));
     do_check_false(hasFlag(t1.permissions, AddonManager.PERM_CAN_DISABLE));
     do_check_false(hasFlag(t1.permissions, AddonManager.PERM_CAN_ENABLE));
 
@@ -101,17 +102,18 @@ function run_test_1() {
   prepare_test({
     "theme1@tests.mozilla.org": [
       "onDisabling"
     ],
     "theme2@tests.mozilla.org": [
       "onEnabling"
     ]
   });
-  AddonManager.getAddons(["theme1@tests.mozilla.org", "theme2@tests.mozilla.org"], function([t1, t2]) {
+  AddonManager.getAddonsByIDs(["theme1@tests.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([t1, t2]) {
     t2.userDisabled = false;
 
     ensure_test_completed();
     do_check_false(hasFlag(t2.permissions, AddonManager.PERM_CAN_DISABLE));
     do_check_false(hasFlag(t2.permissions, AddonManager.PERM_CAN_ENABLE));
 
     do_check_true(t1.userDisabled);
     do_check_false(hasFlag(t1.permissions, AddonManager.PERM_CAN_DISABLE));
@@ -120,17 +122,18 @@ function run_test_1() {
     check_test_1();
   });
 }
 
 function check_test_1() {
   restartManager(0);
   do_check_eq(Services.prefs.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN), "theme2/1.0");
 
-  AddonManager.getAddons(["theme1@tests.mozilla.org", "theme2@tests.mozilla.org"], function([t1, t2]) {
+  AddonManager.getAddonsByIDs(["theme1@tests.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([t1, t2]) {
     do_check_neq(t1, null);
     do_check_true(t1.userDisabled);
     do_check_false(t1.appDisabled);
     do_check_false(t1.isActive);
     do_check_false(isThemeInAddonsList(profileDir, t1.id));
     do_check_false(hasFlag(t1.permissions, AddonManager.PERM_CAN_DISABLE));
     do_check_true(hasFlag(t1.permissions, AddonManager.PERM_CAN_ENABLE));
 
@@ -151,17 +154,18 @@ function check_test_1() {
 function run_test_2() {
   var dest = profileDir.clone();
   dest.append("theme2@tests.mozilla.org");
   dest.remove(true);
 
   restartManager(1);
   do_check_eq(Services.prefs.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN), "classic/1.0");
 
-  AddonManager.getAddons(["theme1@tests.mozilla.org", "theme2@tests.mozilla.org"], function([t1, t2]) {
+  AddonManager.getAddonsByIDs(["theme1@tests.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([t1, t2]) {
     do_check_neq(t1, null);
     do_check_true(t1.userDisabled);
     do_check_false(t1.appDisabled);
     do_check_false(t1.isActive);
     do_check_false(isThemeInAddonsList(profileDir, t1.id));
     do_check_false(hasFlag(t1.permissions, AddonManager.PERM_CAN_DISABLE));
     do_check_true(hasFlag(t1.permissions, AddonManager.PERM_CAN_ENABLE));
 
@@ -214,17 +218,17 @@ function run_test_3() {
     headerURL: "http://localhost:4444/data/header.png",
     footerURL: "http://localhost:4444/data/footer.png",
     previewURL: "http://localhost:4444/data/preview.png",
     iconURL: "http://localhost:4444/data/icon.png"
   };
 
   ensure_test_completed();
 
-  AddonManager.getAddon("1@personas.mozilla.org", function(p1) {
+  AddonManager.getAddonByID("1@personas.mozilla.org", function(p1) {
     do_check_neq(null, p1);
     do_check_eq(p1.name, "Test LW Theme");
     do_check_eq(p1.version, "1");
     do_check_eq(p1.description, "A test theme");
     do_check_eq(p1.creator, "Mozilla");
     do_check_eq(p1.homepageURL, "http://localhost:4444/data/index.html");
     do_check_eq(p1.iconURL, "http://localhost:4444/data/icon.png");
     do_check_eq(p1.screenshots.length, 1);
@@ -284,18 +288,18 @@ function run_test_4() {
     headerURL: "http://localhost:4444/data/header.png",
     footerURL: "http://localhost:4444/data/footer.png",
     previewURL: "http://localhost:4444/data/preview.png",
     iconURL: "http://localhost:4444/data/icon.png"
   };
 
   ensure_test_completed();
 
-  AddonManager.getAddons(["1@personas.mozilla.org",
-                          "2@personas.mozilla.org"], function([p1, p2]) {
+  AddonManager.getAddonsByIDs(["1@personas.mozilla.org",
+                               "2@personas.mozilla.org"], function([p1, p2]) {
     do_check_neq(null, p2);
     do_check_false(p2.appDisabled);
     do_check_false(p2.userDisabled);
     do_check_true(p2.isActive);
     do_check_eq(p2.pendingOperations, 0);
     do_check_eq(p2.permissions, AddonManager.PERM_CAN_UNINSTALL);
 
     do_check_neq(null, p1);
@@ -331,18 +335,18 @@ function run_test_5() {
     "2@personas.mozilla.org": [
       "onDisabling",
     ],
     "theme2@tests.mozilla.org": [
       "onEnabling"
     ]
   });
 
-  AddonManager.getAddons(["2@personas.mozilla.org",
-                          "theme2@tests.mozilla.org"], function([p2, t2]) {
+  AddonManager.getAddonsByIDs(["2@personas.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([p2, t2]) {
     t2.userDisabled = false;
 
     ensure_test_completed();
 
     prepare_test({
       "2@personas.mozilla.org": [
         "onOperationCancelled",
       ],
@@ -378,18 +382,18 @@ function run_test_5() {
 
     check_test_5();
   });
 }
 
 function check_test_5() {
   restartManager(0);
 
-  AddonManager.getAddons(["2@personas.mozilla.org",
-                          "theme2@tests.mozilla.org"], function([p2, t2]) {
+  AddonManager.getAddonsByIDs(["2@personas.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([p2, t2]) {
     do_check_true(t2.isActive);
     do_check_false(t2.userDisabled);
     do_check_false(hasFlag(AddonManager.PENDING_ENABLE, t2.pendingOperations));
     do_check_false(p2.isActive);
     do_check_true(p2.userDisabled);
     do_check_false(hasFlag(AddonManager.PENDING_DISABLE, p2.pendingOperations));
 
     run_test_6();
@@ -402,18 +406,18 @@ function run_test_6() {
     "2@personas.mozilla.org": [
       "onEnabling",
     ],
     "theme2@tests.mozilla.org": [
       "onDisabling"
     ]
   });
 
-  AddonManager.getAddons(["2@personas.mozilla.org",
-                          "theme2@tests.mozilla.org"], function([p2, t2]) {
+  AddonManager.getAddonsByIDs(["2@personas.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([p2, t2]) {
     p2.userDisabled = false;
 
     ensure_test_completed();
 
     prepare_test({
       "2@personas.mozilla.org": [
         "onOperationCancelled",
       ],
@@ -448,18 +452,18 @@ function run_test_6() {
 
     check_test_6();
   });
 }
 
 function check_test_6() {
   restartManager(0);
 
-  AddonManager.getAddons(["2@personas.mozilla.org",
-                          "theme2@tests.mozilla.org"], function([p2, t2]) {
+  AddonManager.getAddonsByIDs(["2@personas.mozilla.org",
+                               "theme2@tests.mozilla.org"], function([p2, t2]) {
     do_check_true(p2.isActive);
     do_check_false(p2.userDisabled);
     do_check_false(hasFlag(AddonManager.PENDING_ENABLE, p2.pendingOperations));
     do_check_false(t2.isActive);
     do_check_true(t2.userDisabled);
     do_check_false(hasFlag(AddonManager.PENDING_DISABLE, t2.pendingOperations));
 
     run_test_7();
@@ -470,17 +474,17 @@ function check_test_6() {
 function run_test_7() {
   prepare_test({
     "1@personas.mozilla.org": [
       ["onUninstalling", false],
       "onUninstalled"
     ]
   });
 
-  AddonManager.getAddon("1@personas.mozilla.org", function(p1) {
+  AddonManager.getAddonByID("1@personas.mozilla.org", function(p1) {
     p1.uninstall();
 
     ensure_test_completed();
     do_check_eq(LightweightThemeManager.usedThemes.length, 1);
 
     run_test_8();
   });
 }
@@ -494,68 +498,68 @@ function run_test_8() {
       "onUninstalled"
     ],
     "default@tests.mozilla.org": [
       ["onEnabling", false],
       "onEnabled"
     ]
   });
 
-  AddonManager.getAddon("2@personas.mozilla.org", function(p2) {
+  AddonManager.getAddonByID("2@personas.mozilla.org", function(p2) {
     p2.uninstall();
 
     ensure_test_completed();
     do_check_eq(LightweightThemeManager.usedThemes.length, 0);
 
     run_test_9();
   });
 }
 
 // Uninstalling a theme not in use should not require a restart
 function run_test_9() {
-  AddonManager.getAddon("theme1@tests.mozilla.org", function(t1) {
+  AddonManager.getAddonByID("theme1@tests.mozilla.org", function(t1) {
     prepare_test({
       "theme1@tests.mozilla.org": [
         ["onUninstalling", false],
         "onUninstalled"
       ]
     });
 
     t1.uninstall();
 
     ensure_test_completed();
 
-    AddonManager.getAddon("theme1@tests.mozilla.org", function(newt1) {
+    AddonManager.getAddonByID("theme1@tests.mozilla.org", function(newt1) {
       do_check_eq(newt1, null);
 
       run_test_10();
     });
   });
 }
 
 // Uninstalling a custom theme in use should require a restart
 function run_test_10() {
-  AddonManager.getAddon("theme2@tests.mozilla.org", function(oldt2) {
+  AddonManager.getAddonByID("theme2@tests.mozilla.org", function(oldt2) {
     prepare_test({
       "theme2@tests.mozilla.org": [
         "onEnabling",
       ],
       "default@tests.mozilla.org": [
         "onDisabling"
       ]
     });
 
     oldt2.userDisabled = false;
 
     ensure_test_completed();
 
     restartManager(0);
 
-    AddonManager.getAddons(["default@tests.mozilla.org",
-                            "theme2@tests.mozilla.org"], function([d, t2]) {
+    AddonManager.getAddonsByIDs(["default@tests.mozilla.org",
+                                 "theme2@tests.mozilla.org"], function([d, t2]) {
       do_check_true(t2.isActive);
       do_check_false(t2.userDisabled);
       do_check_false(t2.appDisabled);
       do_check_false(d.isActive);
       do_check_true(d.userDisabled);
       do_check_false(d.appDisabled);
 
       prepare_test({
@@ -602,17 +606,17 @@ function run_test_11() {
       "onInstallStarted",
       "onInstallEnded",
     ], check_test_11);
     install.install();
   });
 }
 
 function check_test_11() {
-  AddonManager.getAddon("theme1@tests.mozilla.org", function(t1) {
+  AddonManager.getAddonByID("theme1@tests.mozilla.org", function(t1) {
     do_check_neq(t1, null);
 
     run_test_12();
   });
 }
 
 // Updating a custom theme not in use should not require a restart
 function run_test_12() {
@@ -638,26 +642,26 @@ function run_test_12() {
       "onInstallStarted",
       "onInstallEnded",
     ], check_test_12);
     install.install();
   });
 }
 
 function check_test_12() {
-  AddonManager.getAddon("theme1@tests.mozilla.org", function(t1) {
+  AddonManager.getAddonByID("theme1@tests.mozilla.org", function(t1) {
     do_check_neq(t1, null);
 
     run_test_13();
   });
 }
 
 // Updating a custom theme in use should require a restart
 function run_test_13() {
-  AddonManager.getAddon("theme1@tests.mozilla.org", function(t1) {
+  AddonManager.getAddonByID("theme1@tests.mozilla.org", function(t1) {
     prepare_test({
       "theme1@tests.mozilla.org": [
         "onEnabling",
       ],
       "default@tests.mozilla.org": [
         "onDisabling"
       ]
     });
@@ -690,15 +694,15 @@ function run_test_13() {
       install.install();
     });
   });
 }
 
 function check_test_13() {
   restartManager(1);
 
-  AddonManager.getAddon("theme1@tests.mozilla.org", function(t1) {
+  AddonManager.getAddonByID("theme1@tests.mozilla.org", function(t1) {
     do_check_neq(t1, null);
     do_check_true(t1.isActive);
 
     end_test();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_uninstall.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_uninstall.js
@@ -20,26 +20,26 @@ profileDir.append("extensions");
 
 // Sets up the profile by installing an add-on.
 function run_test() {
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
 
   do_test_pending();
   startupManager(1);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(olda1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(olda1) {
     do_check_eq(olda1, null);
 
     var dest = profileDir.clone();
     dest.append("addon1@tests.mozilla.org");
     writeInstallRDFToDir(addon1, dest);
 
     restartManager(1);
 
-    AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
       do_check_neq(a1, null);
       do_check_true(a1.isActive);
       do_check_false(a1.userDisabled);
       do_check_true(isExtensionInAddonsList(profileDir, a1.id));
       do_check_eq(a1.pendingOperations, 0);
       do_check_in_crash_annotation(addon1.id, addon1.version);
 
       run_test_1();
@@ -53,37 +53,37 @@ function end_test() {
 
 // Uninstalling an add-on should work.
 function run_test_1() {
   prepare_test({
     "addon1@tests.mozilla.org": [
       "onUninstalling"
     ]
   });
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_eq(a1.pendingOperations, 0);
     a1.uninstall();
     do_check_true(hasFlag(a1.pendingOperations, AddonManager.PENDING_UNINSTALL));
     do_check_in_crash_annotation(addon1.id, addon1.version);
 
     ensure_test_completed();
 
-    AddonManager.getAddonsWithPendingOperations(null, function(list) {
+    AddonManager.getAddonsWithOperationsByTypes(null, function(list) {
       do_check_eq(list.length, 1);
       do_check_eq(list[0].id, "addon1@tests.mozilla.org");
 
       check_test_1();
     });
   });
 }
 
 function check_test_1() {
   restartManager(0);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_eq(a1, null);
     do_check_false(isExtensionInAddonsList(profileDir, "addon1@tests.mozilla.org"));
     do_check_not_in_crash_annotation(addon1.id, addon1.version);
 
     var dest = profileDir.clone();
     dest.append("addon1@tests.mozilla.org");
     do_check_false(dest.exists());
     writeInstallRDFToDir(addon1, dest);
@@ -96,17 +96,17 @@ function check_test_1() {
 // Cancelling the uninstall should send onOperationCancelled
 function run_test_2() {
   prepare_test({
     "addon1@tests.mozilla.org": [
       "onUninstalling"
     ]
   });
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_neq(a1, null);
     do_check_true(a1.isActive);
     do_check_false(a1.userDisabled);
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
     do_check_eq(a1.pendingOperations, 0);
     a1.uninstall();
     do_check_true(hasFlag(a1.pendingOperations, AddonManager.PENDING_UNINSTALL));
 
@@ -124,29 +124,29 @@ function run_test_2() {
 
     check_test_2();
   });
 }
 
 function check_test_2() {
   restartManager(0);
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_neq(a1, null);
     do_check_true(a1.isActive);
     do_check_false(a1.userDisabled);
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
 
     run_test_3();
   });
 }
 
 // Uninstalling an item pending disable should still require a restart
 function run_test_3() {
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     prepare_test({
       "addon1@tests.mozilla.org": [
         "onDisabling"
       ]
     });
     a1.userDisabled = true;
     ensure_test_completed();
 
@@ -162,17 +162,17 @@ function run_test_3() {
 
     check_test_3();
   });
 }
 
 function check_test_3() {
   ensure_test_completed();
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_neq(a1, null);
     do_check_true(hasFlag(AddonManager.PENDING_DISABLE, a1.pendingOperations));
     do_check_true(hasFlag(AddonManager.PENDING_UNINSTALL, a1.pendingOperations));
 
     prepare_test({
       "addon1@tests.mozilla.org": [
         "onOperationCancelled"
       ]
@@ -182,17 +182,17 @@ function check_test_3() {
 
     restartManager(0);
     run_test_4();
   });
 }
 
 // Test that uninstalling an inactive item should happen without a restart
 function run_test_4() {
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_neq(a1, null);
     do_check_false(a1.isActive);
     do_check_true(a1.userDisabled);
     do_check_false(isExtensionInAddonsList(profileDir, a1.id));
 
     prepare_test({
       "addon1@tests.mozilla.org": [
         ["onUninstalling", false],
@@ -201,14 +201,14 @@ function run_test_4() {
     });
     a1.uninstall();
 
     check_test_4();
   });
 }
 
 function check_test_4() {
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_eq(a1, null);
 
     end_test();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_update.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_update.js
@@ -76,17 +76,17 @@ function run_test() {
 }
 
 function end_test() {
   testserver.stop(do_test_finished);
 }
 
 // Verify that an update is available and can be installed.
 function run_test_1() {
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_neq(a1, null);
     do_check_eq(a1.version, "1.0");
 
     prepare_test({}, [
       "onNewInstall",
     ]);
 
     a1.findUpdates({
@@ -133,37 +133,37 @@ function run_test_2() {
     "onInstallStarted",
     "onInstallEnded",
   ], check_test_2);
 }
 
 function check_test_2() {
   ensure_test_completed();
 
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(olda1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(olda1) {
     do_check_neq(olda1, null);
     do_check_eq(olda1.version, "1.0");
     restartManager(1);
 
-    AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
       do_check_neq(a1, null);
       do_check_eq(a1.version, "2.0");
       do_check_true(isExtensionInAddonsList(profileDir, a1.id));
       a1.uninstall();
       restartManager(0);
 
       run_test_3();
     });
   });
 }
 
 
 // Check that an update check finds compatibility updates and applies them
 function run_test_3() {
-  AddonManager.getAddon("addon2@tests.mozilla.org", function(a2) {
+  AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
     do_check_neq(a2, null);
     do_check_false(a2.isActive);
     do_check_false(a2.isCompatible);
     do_check_true(a2.appDisabled);
     do_check_true(a2.isCompatibleWith("0"));
 
     a2.findUpdates({
       onCompatibilityUpdateAvailable: function(addon) {
@@ -181,30 +181,30 @@ function run_test_3() {
         restartManager(0);
         check_test_3();
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
 
 function check_test_3() {
-  AddonManager.getAddon("addon2@tests.mozilla.org", function(a2) {
+  AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
     do_check_neq(a2, null);
     do_check_true(a2.isActive);
     do_check_true(a2.isCompatible);
     do_check_false(a2.appDisabled);
     a2.uninstall();
 
     run_test_4();
   });
 }
 
 // Checks that we see no compatibility information when there is none.
 function run_test_4() {
-  AddonManager.getAddon("addon3@tests.mozilla.org", function(a3) {
+  AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
     do_check_neq(a3, null);
     do_check_false(a3.isActive);
     do_check_false(a3.isCompatible);
     do_check_true(a3.appDisabled);
     do_check_true(a3.isCompatibleWith("5"));
     do_check_false(a3.isCompatibleWith("2"));
 
     a3.findUpdates({
@@ -227,17 +227,17 @@ function run_test_4() {
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
 
 // Checks that compatibility info for future apps are detected but don't make
 // the item compatibile.
 function run_test_5() {
-  AddonManager.getAddon("addon3@tests.mozilla.org", function(a3) {
+  AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
     do_check_neq(a3, null);
     do_check_false(a3.isActive);
     do_check_false(a3.isCompatible);
     do_check_true(a3.appDisabled);
     do_check_true(a3.isCompatibleWith("5"));
     do_check_false(a3.isCompatibleWith("2"));
 
     a3.findUpdates({
@@ -262,17 +262,17 @@ function run_test_5() {
         restartManager(0);
         check_test_5();
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED, "3.0");
   });
 }
 
 function check_test_5() {
-  AddonManager.getAddon("addon3@tests.mozilla.org", function(a3) {
+  AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
     do_check_neq(a3, null);
     do_check_false(a3.isActive);
     do_check_false(a3.isCompatible);
     do_check_true(a3.appDisabled);
 
     a3.uninstall();
     restartManager(0);
 
@@ -321,17 +321,17 @@ function continue_test_6(install) {
     "onInstallEnded",
   ], check_test_6);
 }
 
 function check_test_6(install) {
   do_check_eq(install.existingAddon.pendingUpgrade.install, install);
 
   restartManager(1);
-  AddonManager.getAddon("addon1@tests.mozilla.org", function(a1) {
+  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
     do_check_neq(a1, null);
     do_check_eq(a1.version, "2.0");
     a1.uninstall();
     restartManager(0);
 
     run_test_7();
   });
 }
@@ -370,17 +370,17 @@ function run_test_7() {
       headerURL: "http://localhost:4444/data/header.png",
       footerURL: "http://localhost:4444/data/footer.png",
       previewURL: "http://localhost:4444/data/preview.png",
       iconURL: "http://localhost:4444/data/icon2.png",
       updateURL: "http://localhost:4444/data/lwtheme.js"
     }));
   });
 
-  AddonManager.getAddon("1@personas.mozilla.org", function(p1) {
+  AddonManager.getAddonByID("1@personas.mozilla.org", function(p1) {
     do_check_neq(p1, null);
     do_check_eq(p1.version, "1");
     do_check_eq(p1.name, "Test LW Theme");
     do_check_true(p1.isActive);
 
     prepare_test({
       "1@personas.mozilla.org": [
         ["onInstalling", false],
@@ -392,17 +392,17 @@ function run_test_7() {
   
     // Fake a timer event to cause a background update and wait for the magic to
     // happen
     gInternalManager.notify(null);
   });
 }
 
 function check_test_7() {
-  AddonManager.getAddon("1@personas.mozilla.org", function(p1) {
+  AddonManager.getAddonByID("1@personas.mozilla.org", function(p1) {
     do_check_neq(p1, null);
     do_check_eq(p1.version, "2");
     do_check_eq(p1.name, "Updated Theme");
 
     run_test_8();
   });
 }
 
@@ -493,17 +493,17 @@ function run_test_8() {
       minVersion: "1",
       maxVersion: "1"
     }],
     name: "Test Addon 6",
   }, dest);
 
   restartManager(1);
 
-  AddonManager.getAddon("addon2@tests.mozilla.org", function(a2) {
+  AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
     a2.userDisabled = true;
     restartManager(0);
 
     testserver.registerPathHandler("/data/param_test.rdf", function(request, response) {
       do_check_neq(request.queryString, "");
       let [req_version, item_id, item_version,
            item_maxappversion, item_status,
            app_id, app_version, current_app_version,
@@ -563,23 +563,23 @@ function run_test_8() {
       do_check_eq(current_app_version, "1");
       do_check_eq(app_os, "XPCShell");
       do_check_eq(app_abi, "noarch-spidermonkey");
       do_check_eq(app_locale, "en-US");
 
       request.setStatusLine(null, 500, "Server Error");
     });
 
-    AddonManager.getAddons(["addon1@tests.mozilla.org",
-                            "addon2@tests.mozilla.org",
-                            "addon3@tests.mozilla.org",
-                            "addon4@tests.mozilla.org",
-                            "addon5@tests.mozilla.org",
-                            "addon6@tests.mozilla.org"],
-                            function([a1, a2, a3, a4, a5, a6]) {
+    AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                                 "addon2@tests.mozilla.org",
+                                 "addon3@tests.mozilla.org",
+                                 "addon4@tests.mozilla.org",
+                                 "addon5@tests.mozilla.org",
+                                 "addon6@tests.mozilla.org"],
+                                 function([a1, a2, a3, a4, a5, a6]) {
       let count = 6;
 
       let compatListener = {
         onUpdateFinished: function(addon, error) {
           if (--count == 0)
             end_test();
         }
       };
@@ -630,57 +630,57 @@ function run_test_9() {
       minVersion: "0",
       maxVersion: "1"
     }],
     name: "Test Addon 1",
   }, dest);
 
   restartManager(1);
 
-  AddonManager.getAddon("addon4@tests.mozilla.org", function(a4) {
+  AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
     do_check_true(a4.isActive);
     do_check_true(a4.isCompatible);
 
     run_test_10();
   });
 }
 
 // Tests that a normal update check won't decrease a targetApplication's
 // maxVersion.
 function run_test_10() {
-  AddonManager.getAddon("addon4@tests.mozilla.org", function(a4) {
+  AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
     a4.findUpdates({
       onUpdateFinished: function(addon) {
         do_check_true(addon.isCompatible);
 
         run_test_11();
       }
     }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
   });
 }
 
 // Tests that an update check for a new application will decrease a
 // targetApplication's maxVersion.
 function run_test_11() {
-  AddonManager.getAddon("addon4@tests.mozilla.org", function(a4) {
+  AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
     a4.findUpdates({
       onUpdateFinished: function(addon) {
         do_check_false(addon.isCompatible);
 
         run_test_12();
       }
     }, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
   });
 }
 
 // Check that the decreased maxVersion applied and disables the add-on
 function run_test_12() {
   restartManager(0);
 
-  AddonManager.getAddon("addon4@tests.mozilla.org", function(a4) {
+  AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
     do_check_false(a4.isActive);
     do_check_false(a4.isCompatible);
 
     a4.uninstall();
     restartManager();
 
     run_test_13();
   });
@@ -701,17 +701,17 @@ function run_test_13() {
       id: "xpcshell@tests.mozilla.org",
       minVersion: "0",
       maxVersion: "0"
     }],
     name: "Test Addon 7",
   }, dest);
   restartManager(1);
 
-  AddonManager.getAddon("addon7@tests.mozilla.org", function(a7) {
+  AddonManager.getAddonByID("addon7@tests.mozilla.org", function(a7) {
     do_check_neq(a7, null);
     do_check_false(a7.isActive);
     do_check_false(a7.isCompatible);
     do_check_true(a7.appDisabled);
     do_check_true(a7.isCompatibleWith("0"));
 
     a7.findUpdates({
       sawUpdate: false,
@@ -728,17 +728,17 @@ function run_test_13() {
         restartManager(0);
         check_test_13();
       }
     }, AddonManager.UPDATE_WHEN_NEW_APP_DETECTED, "3.0");
   });
 }
 
 function check_test_13() {
-  AddonManager.getAddon("addon7@tests.mozilla.org", function(a7) {
+  AddonManager.getAddonByID("addon7@tests.mozilla.org", function(a7) {
     do_check_neq(a7, null);
     do_check_true(a7.isActive);
     do_check_true(a7.isCompatible);
     do_check_false(a7.appDisabled);
 
     a7.uninstall();
     restartManager(0);
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_upgrade.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_upgrade.js
@@ -56,19 +56,19 @@ function run_test() {
 
   run_test_1();
 }
 
 // Test that the test extensions are all installed
 function run_test_1() {
   startupManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org"], function([a1, a2, a3]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org"], function([a1, a2, a3]) {
 
     do_check_neq(a1, null);
     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
 
     do_check_neq(a2, null);
     do_check_true(isExtensionInAddonsList(profileDir, a2.id));
 
     do_check_neq(a3, null);
@@ -76,19 +76,19 @@ function run_test_1() {
 
     run_test_2();
   });
 }
 
 // Test that upgrading the application disables now incompatible add-ons
 function run_test_2() {
   restartManager(1, "2");
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org"], function([a1, a2, a3]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org"], function([a1, a2, a3]) {
 
     do_check_neq(a1, null);
     do_check_false(isExtensionInAddonsList(profileDir, a1.id));
 
     do_check_neq(a2, null);
     do_check_true(isExtensionInAddonsList(profileDir, a2.id));
 
     do_check_neq(a3, null);
@@ -102,19 +102,19 @@ function run_test_2() {
 function run_test_3() {
   // Simulates a simple Build ID change, the platform deletes extensions.ini
   // whenever the application is changed.
   var file = gProfD.clone();
   file.append("extensions.ini");
   file.remove(true);
   restartManager(1);
 
-  AddonManager.getAddons(["addon1@tests.mozilla.org",
-                          "addon2@tests.mozilla.org",
-                          "addon3@tests.mozilla.org"], function([a1, a2, a3]) {
+  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
+                               "addon2@tests.mozilla.org",
+                               "addon3@tests.mozilla.org"], function([a1, a2, a3]) {
 
     do_check_neq(a1, null);
     do_check_false(isExtensionInAddonsList(profileDir, a1.id));
 
     do_check_neq(a2, null);
     do_check_true(isExtensionInAddonsList(profileDir, a2.id));
 
     do_check_neq(a3, null);
--- a/toolkit/mozapps/update/content/updates.js
+++ b/toolkit/mozapps/update/content/updates.js
@@ -518,17 +518,17 @@ var gUpdates = {
              getService(CoI.nsIVersionComparator);
     if (!this.update.appVersion ||
         vc.compare(this.update.appVersion, ai.version) == 0) {
       aCallback(false);
       return;
     }
 
     var self = this;
-    AddonManager.getAddonsByTypes(["extension", "theme", "locale"], function(addons) {
+    AddonManager.getAllAddons(function(addons) {
       self.addons = [];
       addons.forEach(function(addon) {
         // If an add-on isn't appDisabled and isn't userDisabled then it is
         // either active now or the user expects it to be active after the
         // restart. If that is the case and the add-on is not installed by the
         // application and is not compatible with the new application version
         // then the user should be warned that the add-on will become
         // incompatible.
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -1460,17 +1460,17 @@ UpdateService.prototype = {
     var prompter = Cc["@mozilla.org/updates/update-prompt;1"].
                    createInstance(Ci.nsIUpdatePrompt);
     prompter.showUpdateAvailable(update);
   },
 
   _checkAddonCompatibility: function AUS__checkAddonCompatibility() {
     // Get all the installed add-ons
     var self = this;
-    AddonManager.getAddonsByTypes(["extension", "theme", "locale"], function(addons) {
+    AddonManager.getAllAddons(function(addons) {
       self._incompatibleAddons = [];
       addons.forEach(function(addon) {
         // If an add-on isn't appDisabled and isn't userDisabled then it is
         // either active now or the user expects it to be active after the
         // restart. If that is the case and the add-on is not installed by the
         // application and is not compatible with the new application version
         // then the user should be warned that the add-on will become
         // incompatible.