Bug 1161183 - Don't show the add-on version in the list view. r=dao, a=sledru
authorDave Townsend <dtownsend@oxymoronical.com>
Fri, 19 Jun 2015 16:08:00 -0400
changeset 275189 1401e3301b8dc5d1bf1ba72d5bd6dfc7fd38edfd
parent 275188 7fdd6ef122314c4998f1783919b81d1427e01b5f
child 275190 a0ace403b8a916238fcd4ea4262c76c0f1bd19cd
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, sledru
bugs1161183
milestone40.0a2
Bug 1161183 - Don't show the add-on version in the list view. r=dao, a=sledru
toolkit/mozapps/extensions/content/extensions.css
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xml
toolkit/mozapps/extensions/content/extensions.xul
toolkit/mozapps/extensions/test/browser/browser_bug580298.js
toolkit/mozapps/extensions/test/browser/browser_bug596336.js
toolkit/mozapps/extensions/test/browser/browser_experiments.js
toolkit/mozapps/extensions/test/browser/browser_list.js
toolkit/mozapps/extensions/test/browser/browser_manualupdates.js
toolkit/mozapps/extensions/test/browser/browser_updateid.js
toolkit/mozapps/extensions/test/browser/head.js
--- a/toolkit/mozapps/extensions/content/extensions.css
+++ b/toolkit/mozapps/extensions/content/extensions.css
@@ -238,17 +238,16 @@ richlistitem:not([selected]) * {
   display: none;
 }
 
 .view-pane[type="experiment"] .error,
 .view-pane[type="experiment"] .warning,
 .view-pane[type="experiment"] .addon:not([pending="uninstall"]) .pending,
 .view-pane[type="experiment"] .disabled-postfix,
 .view-pane[type="experiment"] .update-postfix,
-.view-pane[type="experiment"] .version,
 #detail-view[type="experiment"] .alert-container,
 #detail-view[type="experiment"] #detail-version,
 #detail-view[type="experiment"] #detail-creator {
   display: none;
 }
 
 .view-pane:not([type="experiment"]) .experiment-container,
 .view-pane:not([type="experiment"]) #detail-experiment-container {
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -455,16 +455,41 @@ var gEventManager = {
             countMenuItemsBeforeSep++;
         }
       }
 
       // Hide the separator if there are no visible menu items before it
       menuSep.hidden = (countMenuItemsBeforeSep == 0);
 
     }, false);
+
+    let addonTooltip = document.getElementById("addonitem-tooltip");
+    addonTooltip.addEventListener("popupshowing", function() {
+      let addonItem = addonTooltip.triggerNode;
+      // The way the test triggers the tooltip the richlistitem is the
+      // tooltipNode but in normal use it is the anonymous node. This allows
+      // any case
+      if (addonItem.localName != "richlistitem")
+        addonItem = document.getBindingParent(addonItem);
+
+      let tiptext = addonItem.getAttribute("name");
+
+      if (addonItem.mAddon) {
+        if (shouldShowVersionNumber(addonItem.mAddon)) {
+          tiptext += " " + (addonItem.hasAttribute("upgrade") ? addonItem.mManualUpdate.version
+                                                              : addonItem.mAddon.version);
+        }
+      }
+      else {
+        if (shouldShowVersionNumber(addonItem.mInstall))
+          tiptext += " " + addonItem.mInstall.version;
+      }
+
+      addonTooltip.label = tiptext;
+    }, false);
   },
 
   shutdown: function gEM_shutdown() {
     AddonManager.removeManagerListener(this);
     AddonManager.removeInstallListener(this);
     AddonManager.removeAddonListener(this);
   },
 
@@ -1443,16 +1468,20 @@ function isInState(aInstall, aState) {
   var state = AddonManager["STATE_" + aState.toUpperCase()];
   return aInstall.state == state;
 }
 
 function shouldShowVersionNumber(aAddon) {
   if (!aAddon.version)
     return false;
 
+  // The version number is hidden for experiments.
+  if (aAddon.type == "experiment")
+    return false;
+
   // The version number is hidden for lightweight themes.
   if (aAddon.type == "theme")
     return !/@personas\.mozilla\.org$/.test(aAddon.id);
 
   return true;
 }
 
 function createItem(aObj, aIsInstall, aIsRemote) {
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -790,18 +790,17 @@
       <xul:hbox class="content-container" align="center">
         <xul:vbox class="icon-container">
           <xul:image anonid="icon" class="icon"/>
         </xul:vbox>
         <xul:vbox class="content-inner-container" flex="1">
           <xul:hbox class="basicinfo-container">
               <xul:hbox class="name-container">
                 <xul:label anonid="name" class="name" crop="end" flex="1"
-                           xbl:inherits="value=name,tooltiptext=name"/>
-                <xul:label anonid="version" class="version"/>
+                           tooltip="addonitem-tooltip" xbl:inherits="value=name"/>
                 <xul:label class="disabled-postfix" value="&addon.disabled.postfix;"/>
                 <xul:label class="update-postfix" value="&addon.update.postfix;"/>
                 <xul:spacer flex="5000"/> <!-- Necessary to make the name crop -->
               </xul:hbox>
             <xul:label anonid="date-updated" class="date-updated"
                        unknown="&addon.unknownDate;"/>
           </xul:hbox>
           <xul:hbox class="experiment-container">
@@ -974,19 +973,16 @@
       <field name="_infoContainer">
         document.getAnonymousElementByAttribute(this, "anonid",
                                                 "info-container");
       </field>
       <field name="_info">
         document.getAnonymousElementByAttribute(this, "anonid",
                                                 "info");
       </field>
-      <field name="_version">
-        document.getAnonymousElementByAttribute(this, "anonid", "version");
-      </field>
       <field name="_experimentState">
         document.getAnonymousElementByAttribute(this, "anonid", "experiment-state");
       </field>
       <field name="_experimentTime">
         document.getAnonymousElementByAttribute(this, "anonid", "experiment-time");
       </field>
       <field name="_icon">
         document.getAnonymousElementByAttribute(this, "anonid", "icon");
@@ -1113,21 +1109,16 @@
           this.setAttribute("name", aAddon.name);
 
           var iconURL = this.mAddon.iconURL;
           if (iconURL)
             this._icon.src = iconURL;
           else
             this._icon.src = "";
 
-          if (shouldShowVersionNumber(this.mAddon))
-            this._version.value = this.mAddon.version;
-          else
-            this._version.hidden = true;
-
           if (this.mAddon.description)
             this._description.value = this.mAddon.description;
           else
             this._description.hidden = true;
 
           if (!("applyBackgroundUpdates" in this.mAddon) ||
               (this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DISABLE ||
                (this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DEFAULT &&
@@ -1409,24 +1400,16 @@
               }
 
               this._experimentTime.value = timeMessage;
             }
           }
         ]]></body>
       </method>
 
-      <method name="_updateUpgradeInfo">
-        <body><![CDATA[
-          // Only update the version string if we're displaying the upgrade info
-          if (this.hasAttribute("upgrade") && shouldShowVersionNumber(this.mAddon))
-            this._version.value = this.mManualUpdate.version;
-        ]]></body>
-      </method>
-
       <method name="_fetchReleaseNotes">
         <parameter name="aURI"/>
         <body><![CDATA[
           var self = this;
           if (!aURI || this._relNotesLoaded) {
             sendToggleEvent();
             return;
           }
@@ -1706,17 +1689,16 @@
           if (this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_ENABLE)
             return;
           if (this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DEFAULT &&
               AddonManager.autoUpdateDefault)
             return;
 
           this.mManualUpdate = aInstall;
           this._showStatus("update-available");
-          this._updateUpgradeInfo();
         ]]></body>
       </method>
 
       <method name="onDownloadStarted">
         <parameter name="aInstall"/>
         <body><![CDATA[
           this._updateState();
           this._showStatus("progress");
@@ -1908,18 +1890,17 @@
       <xul:hbox class="content-container">
         <xul:vbox class="icon-outer-container">
           <xul:vbox class="icon-container">
             <xul:image anonid="icon" class="icon"/>
           </xul:vbox>
         </xul:vbox>
         <xul:vbox class="fade name-outer-container" flex="1">
           <xul:hbox class="name-container">
-            <xul:label anonid="name" class="name" crop="end"/>
-            <xul:label anonid="version" class="version" hidden="true"/>
+            <xul:label anonid="name" class="name" crop="end" tooltip="addonitem-tooltip"/>
           </xul:hbox>
         </xul:vbox>
         <xul:vbox class="install-status-container">
           <xul:hbox anonid="install-status" class="install-status"/>
         </xul:vbox>
       </xul:hbox>
     </content>
 
@@ -1931,19 +1912,16 @@
       ]]></constructor>
 
       <field name="_icon">
         document.getAnonymousElementByAttribute(this, "anonid", "icon");
       </field>
       <field name="_name">
         document.getAnonymousElementByAttribute(this, "anonid", "name");
       </field>
-      <field name="_version">
-        document.getAnonymousElementByAttribute(this, "anonid", "version");
-      </field>
       <field name="_warning">
         document.getAnonymousElementByAttribute(this, "anonid", "warning");
       </field>
       <field name="_warningLink">
         document.getAnonymousElementByAttribute(this, "anonid", "warning-link");
       </field>
       <field name="_installStatus">
         document.getAnonymousElementByAttribute(this, "anonid",
@@ -1961,44 +1939,29 @@
 
       <method name="refreshInfo">
         <body><![CDATA[
           this.mAddon = this.mAddon || this.mInstall.addon;
           if (this.mAddon) {
             this._icon.src = this.mAddon.iconURL ||
                              (this.mInstall ? this.mInstall.iconURL : "");
             this._name.value = this.mAddon.name;
-
-            if (this.mAddon.version) {
-              this._version.value = this.mAddon.version;
-              this._version.hidden = false;
-            } else {
-              this._version.hidden = true;
-            }
-
           } else {
             this._icon.src = this.mInstall.iconURL;
             // AddonInstall.name isn't always available - fallback to filename
             if (this.mInstall.name) {
               this._name.value = this.mInstall.name;
             } else if (this.mInstall.sourceURI) {
               var url = Components.classes["@mozilla.org/network/standard-url;1"]
                                   .createInstance(Components.interfaces.nsIStandardURL);
               url.init(url.URLTYPE_STANDARD, 80, this.mInstall.sourceURI.spec,
                        null, null);
               url.QueryInterface(Components.interfaces.nsIURL);
               this._name.value = url.fileName;
             }
-
-            if (this.mInstall.version) {
-              this._version.value = this.mInstall.version;
-              this._version.hidden = false;
-            } else {
-              this._version.hidden = true;
-            }
           }
 
           if (this.mInstall.state == AddonManager.STATE_DOWNLOAD_FAILED) {
             this.setAttribute("notification", "warning");
             this._warning.textContent = gStrings.ext.formatStringFromName(
               "notification.downloadError",
               [this._name.value], 1
             );
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -66,16 +66,18 @@
 #endif
       <menuitem id="menuitem_findUpdates" command="cmd_findItemUpdates"
                 label="&cmd.findUpdates.label;"
                 accesskey="&cmd.findUpdates.accesskey;"/>
       <menuitem id="menuitem_about" command="cmd_showItemAbout"
                 label="&cmd.about.label;"
                 accesskey="&cmd.about.accesskey;"/>
     </menupopup>
+
+    <tooltip id="addonitem-tooltip"/>
   </popupset>
 
   <!-- global commands - these act on all addons, or affect the addons manager
        in some other way -->
   <commandset id="globalCommandSet">
     <command id="cmd_focusSearch"/>
     <command id="cmd_findAllUpdates"/>
     <command id="cmd_restartApp"/>
--- a/toolkit/mozapps/extensions/test/browser/browser_bug580298.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug580298.js
@@ -4,19 +4,17 @@
 
 // Tests that certain types of addons do not have their version number
 // displayed. This currently only includes lightweight themes.
 
 var gManagerWindow;
 var gCategoryUtilities;
 var gProvider;
 
-function test() {
-  waitForExplicitFinish();
-
+add_task(function test() {
   gProvider = new MockProvider();
 
   gProvider.createAddons([{
     id: "extension@tests.mozilla.org",
     name: "Extension 1",
     type: "extension",
     version: "123"
   }, {
@@ -26,86 +24,75 @@ function test() {
     version: "456"
   }, {
     id: "lwtheme@personas.mozilla.org",
     name: "Persona 3",
     type: "theme",
     version: "789"
   }]);
 
-  open_manager(null, function(aWindow) {
-    gManagerWindow = aWindow;
-    gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-    run_next_test();
-  });
-}
-
-function end_test() {
-  close_manager(gManagerWindow, finish);
-}
+  gManagerWindow = yield open_manager();
+  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
+});
 
 function get(aId) {
   return gManagerWindow.document.getElementById(aId);
 }
 
 function get_node(parent, anonid) {
   return parent.ownerDocument.getAnonymousElementByAttribute(parent, "anonid", anonid);
 }
 
 function open_details(aList, aItem, aCallback) {
   aList.ensureElementIsVisible(aItem);
   EventUtils.synthesizeMouseAtCenter(aItem, { clickCount: 1 }, gManagerWindow);
   EventUtils.synthesizeMouseAtCenter(aItem, { clickCount: 2 }, gManagerWindow);
-  wait_for_view_load(gManagerWindow, aCallback);
+  return new Promise(resolve => wait_for_view_load(gManagerWindow, resolve));
 }
 
-function check_addon_has_version(aList, aName, aVersion) {
+let check_addon_has_version = Task.async(function*(aList, aName, aVersion) {
   for (let i = 0; i < aList.itemCount; i++) {
     let item = aList.getItemAtIndex(i);
     if (get_node(item, "name").value === aName) {
       ok(true, "Item with correct name found");
-      is(get_node(item, "version").value, aVersion, "Item has correct version");
+      let { version } = yield get_tooltip_info(item);
+      is(version, aVersion, "Item has correct version");
       return item;
     }
   }
   ok(false, "Item with correct name was not found");
   return null;
-}
+});
 
-add_test(function() {
-  gCategoryUtilities.openType("extension", function() {
-    info("Extension");
-    let list = gManagerWindow.document.getElementById("addon-list");
-    let item = check_addon_has_version(list, "Extension 1", "123");
-    open_details(list, item, function() {
-      is_element_visible(get("detail-version"), "Details view has version visible");
-      is(get("detail-version").value, "123", "Details view has correct version");
-      run_next_test();
-    });
-  });
+add_task(function*() {
+  yield gCategoryUtilities.openType("extension");
+  info("Extension");
+  let list = gManagerWindow.document.getElementById("addon-list");
+  let item = yield check_addon_has_version(list, "Extension 1", "123");
+  yield open_details(list, item);
+  is_element_visible(get("detail-version"), "Details view has version visible");
+  is(get("detail-version").value, "123", "Details view has correct version");
 });
 
-add_test(function() {
-  gCategoryUtilities.openType("theme", function() {
-    info("Normal theme");
-    let list = gManagerWindow.document.getElementById("addon-list");
-    let item = check_addon_has_version(list, "Theme 2", "456");
-    open_details(list, item, function() {
-      is_element_visible(get("detail-version"), "Details view has version visible");
-      is(get("detail-version").value, "456", "Details view has correct version");
-      run_next_test();
-    });
-  });
+add_task(function*() {
+  yield gCategoryUtilities.openType("theme");
+  info("Normal theme");
+  let list = gManagerWindow.document.getElementById("addon-list");
+  let item = yield check_addon_has_version(list, "Theme 2", "456");
+  yield open_details(list, item);
+  is_element_visible(get("detail-version"), "Details view has version visible");
+  is(get("detail-version").value, "456", "Details view has correct version");
 });
 
-add_test(function() {
-  gCategoryUtilities.openType("theme", function() {
-    info("Lightweight theme");
-    let list = gManagerWindow.document.getElementById("addon-list");
-    // See that the version isn't displayed
-    let item = check_addon_has_version(list, "Persona 3", "");
-    open_details(list, item, function() {
-      is_element_hidden(get("detail-version"), "Details view has version hidden");
-      // If the version element is hidden then we don't care about its value
-      run_next_test();
-    });
-  });
+add_task(function*() {
+  yield gCategoryUtilities.openType("theme");
+  info("Lightweight theme");
+  let list = gManagerWindow.document.getElementById("addon-list");
+  // See that the version isn't displayed
+  let item = yield check_addon_has_version(list, "Persona 3", undefined);
+  yield open_details(list, item);
+  is_element_hidden(get("detail-version"), "Details view has version hidden");
+  // If the version element is hidden then we don't care about its value
 });
+
+add_task(function end_test() {
+  close_manager(gManagerWindow, finish);
+});
--- a/toolkit/mozapps/extensions/test/browser/browser_bug596336.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug596336.js
@@ -3,180 +3,156 @@
  */
 
 // Tests that upgrading bootstrapped add-ons behaves correctly while the
 // manager is open
 
 var gManagerWindow;
 var gCategoryUtilities;
 
-function test() {
+add_task(function* test() {
   waitForExplicitFinish();
 
-  open_manager("addons://list/extension", function(aWindow) {
-    gManagerWindow = aWindow;
-    gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-    run_next_test();
-  });
-}
-
-function end_test() {
-  close_manager(gManagerWindow, finish);
-}
+  gManagerWindow = yield open_manager("addons://list/extension");
+  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
+});
 
 function get_list_item_count() {
   return get_test_items_in_list(gManagerWindow).length;
 }
 
 function get_node(parent, anonid) {
   return parent.ownerDocument.getAnonymousElementByAttribute(parent, "anonid", anonid);
 }
 
 function get_class_node(parent, cls) {
   return parent.ownerDocument.getAnonymousElementByAttribute(parent, "class", cls);
 }
 
-function install_addon(aXpi, aCallback) {
-  AddonManager.getInstallForURL(TESTROOT + "addons/" + aXpi + ".xpi",
-                                function(aInstall) {
-    aInstall.addListener({
-      onInstallEnded: function(aInstall) {
-        executeSoon(aCallback);
-      }
-    });
-    aInstall.install();
-  }, "application/x-xpinstall");
+function install_addon(aXpi) {
+  return new Promise(resolve => {
+    AddonManager.getInstallForURL(TESTROOT + "addons/" + aXpi + ".xpi",
+                                  function(aInstall) {
+      aInstall.addListener({
+        onInstallEnded: function(aInstall) {
+          resolve();
+        }
+      });
+      aInstall.install();
+    }, "application/x-xpinstall");
+  });
 }
 
-function check_addon(aAddon, version) {
+let check_addon = Task.async(function*(aAddon, aVersion) {
   is(get_list_item_count(), 1, "Should be one item in the list");
-  is(aAddon.version, version, "Add-on should have the right version");
+  is(aAddon.version, aVersion, "Add-on should have the right version");
 
   let item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
   ok(!!item, "Should see the add-on in the list");
 
   // Force XBL to apply
   item.clientTop;
 
-  is(get_node(item, "version").value, version, "Version should be correct");
+  let { version } = yield get_tooltip_info(item);
+  is(version, aVersion, "Version should be correct");
 
   if (aAddon.userDisabled)
     is_element_visible(get_class_node(item, "disabled-postfix"), "Disabled postfix should be hidden");
   else
     is_element_hidden(get_class_node(item, "disabled-postfix"), "Disabled postfix should be hidden");
-}
+});
 
 // Install version 1 then upgrade to version 2 with the manager open
-add_test(function() {
-  install_addon("browser_bug596336_1", function() {
-    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-      check_addon(aAddon, "1.0");
-      ok(!aAddon.userDisabled, "Add-on should not be disabled");
+add_task(function() {
+  yield install_addon("browser_bug596336_1");
+  let [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  yield check_addon(aAddon, "1.0");
+  ok(!aAddon.userDisabled, "Add-on should not be disabled");
 
-      install_addon("browser_bug596336_2", function() {
-        AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-          check_addon(aAddon, "2.0");
-          ok(!aAddon.userDisabled, "Add-on should not be disabled");
-
-          aAddon.uninstall();
+  yield install_addon("browser_bug596336_2");
+  [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  yield check_addon(aAddon, "2.0");
+  ok(!aAddon.userDisabled, "Add-on should not be disabled");
 
-          is(get_list_item_count(), 0, "Should be no items in the list");
+  aAddon.uninstall();
 
-          run_next_test();
-        });
-      });
-    });
-  });
+  is(get_list_item_count(), 0, "Should be no items in the list");
 });
 
 // Install version 1 mark it as disabled then upgrade to version 2 with the
 // manager open
-add_test(function() {
-  install_addon("browser_bug596336_1", function() {
-    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-      aAddon.userDisabled = true;
-      check_addon(aAddon, "1.0");
-      ok(aAddon.userDisabled, "Add-on should be disabled");
+add_task(function() {
+  yield install_addon("browser_bug596336_1");
+  let [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  aAddon.userDisabled = true;
+  yield check_addon(aAddon, "1.0");
+  ok(aAddon.userDisabled, "Add-on should be disabled");
 
-      install_addon("browser_bug596336_2", function() {
-        AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-          check_addon(aAddon, "2.0");
-          ok(aAddon.userDisabled, "Add-on should be disabled");
-
-          aAddon.uninstall();
+  yield install_addon("browser_bug596336_2");
+  [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  yield check_addon(aAddon, "2.0");
+  ok(aAddon.userDisabled, "Add-on should be disabled");
 
-          is(get_list_item_count(), 0, "Should be no items in the list");
+  aAddon.uninstall();
 
-          run_next_test();
-        });
-      });
-    });
-  });
+  is(get_list_item_count(), 0, "Should be no items in the list");
 });
 
 // Install version 1 click the remove button and then upgrade to version 2 with
 // the manager open
-add_test(function() {
-  install_addon("browser_bug596336_1", function() {
-    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-      check_addon(aAddon, "1.0");
-      ok(!aAddon.userDisabled, "Add-on should not be disabled");
+add_task(function() {
+  yield install_addon("browser_bug596336_1");
+  let [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  yield check_addon(aAddon, "1.0");
+  ok(!aAddon.userDisabled, "Add-on should not be disabled");
 
-      let item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
-      EventUtils.synthesizeMouseAtCenter(get_node(item, "remove-btn"), { }, gManagerWindow);
+  let item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
+  EventUtils.synthesizeMouseAtCenter(get_node(item, "remove-btn"), { }, gManagerWindow);
 
-      // Force XBL to apply
-      item.clientTop;
+  // Force XBL to apply
+  item.clientTop;
 
-      ok(aAddon.userDisabled, "Add-on should be disabled");
-      ok(!aAddon.pendingUninstall, "Add-on should not be pending uninstall");
-      is_element_visible(get_class_node(item, "pending"), "Pending message should be visible");
-
-      install_addon("browser_bug596336_2", function() {
-        AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-          check_addon(aAddon, "2.0");
-          ok(!aAddon.userDisabled, "Add-on should not be disabled");
+  ok(aAddon.userDisabled, "Add-on should be disabled");
+  ok(!aAddon.pendingUninstall, "Add-on should not be pending uninstall");
+  is_element_visible(get_class_node(item, "pending"), "Pending message should be visible");
 
-          aAddon.uninstall();
-
-          is(get_list_item_count(), 0, "Should be no items in the list");
+  yield install_addon("browser_bug596336_2");
+  [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  yield check_addon(aAddon, "2.0");
+  ok(!aAddon.userDisabled, "Add-on should not be disabled");
 
-          run_next_test();
-        });
-      });
-    });
-  });
+  aAddon.uninstall();
+
+  is(get_list_item_count(), 0, "Should be no items in the list");
 });
 
 // Install version 1, disable it, click the remove button and then upgrade to
 // version 2 with the manager open
-add_test(function() {
-  install_addon("browser_bug596336_1", function() {
-    AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-      aAddon.userDisabled = true;
-      check_addon(aAddon, "1.0");
-      ok(aAddon.userDisabled, "Add-on should be disabled");
+add_task(function() {
+  yield install_addon("browser_bug596336_1");
+  let [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  aAddon.userDisabled = true;
+  yield check_addon(aAddon, "1.0");
+  ok(aAddon.userDisabled, "Add-on should be disabled");
 
-      let item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
-      EventUtils.synthesizeMouseAtCenter(get_node(item, "remove-btn"), { }, gManagerWindow);
+  let item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
+  EventUtils.synthesizeMouseAtCenter(get_node(item, "remove-btn"), { }, gManagerWindow);
 
-      // Force XBL to apply
-      item.clientTop;
+  // Force XBL to apply
+  item.clientTop;
 
-      ok(aAddon.userDisabled, "Add-on should be disabled");
-      ok(!aAddon.pendingUninstall, "Add-on should not be pending uninstall");
-      is_element_visible(get_class_node(item, "pending"), "Pending message should be visible");
+  ok(aAddon.userDisabled, "Add-on should be disabled");
+  ok(!aAddon.pendingUninstall, "Add-on should not be pending uninstall");
+  is_element_visible(get_class_node(item, "pending"), "Pending message should be visible");
 
-      install_addon("browser_bug596336_2", function() {
-        AddonManager.getAddonByID("addon1@tests.mozilla.org", function(aAddon) {
-          check_addon(aAddon, "2.0");
-          ok(aAddon.userDisabled, "Add-on should be disabled");
+  yield install_addon("browser_bug596336_2");
+  [aAddon] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org"]);
+  yield check_addon(aAddon, "2.0");
+  ok(aAddon.userDisabled, "Add-on should be disabled");
 
-          aAddon.uninstall();
-
-          is(get_list_item_count(), 0, "Should be no items in the list");
+  aAddon.uninstall();
 
-          run_next_test();
-        });
-      });
-    });
-  });
+  is(get_list_item_count(), 0, "Should be no items in the list");
 });
+
+add_task(function end_test() {
+  close_manager(gManagerWindow, finish);
+});
--- a/toolkit/mozapps/extensions/test/browser/browser_experiments.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_experiments.js
@@ -421,18 +421,18 @@ add_task(function testActivateRealExperi
   }
 
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "error-container");
   is_element_hidden(el, "error-container should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "warning-container");
   is_element_hidden(el, "warning-container should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "pending-container");
   is_element_hidden(el, "pending-container should be hidden.");
-  el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "version");
-  is_element_hidden(el, "version should be hidden.");
+  let { version } = yield get_tooltip_info(item);
+  Assert.equal(version, undefined, "version should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "class", "disabled-postfix");
   is_element_hidden(el, "disabled-postfix should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "class", "update-postfix");
   is_element_hidden(el, "update-postfix should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "class", "experiment-bullet");
   is_element_visible(el, "experiment-bullet should be visible.");
 
   // Check the previous experiment.
@@ -454,18 +454,18 @@ add_task(function testActivateRealExperi
   }
 
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "error-container");
   is_element_hidden(el, "error-container should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "warning-container");
   is_element_hidden(el, "warning-container should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "pending-container");
   is_element_hidden(el, "pending-container should be hidden.");
-  el = item.ownerDocument.getAnonymousElementByAttribute(item, "anonid", "version");
-  is_element_hidden(el, "version should be hidden.");
+  ({ version }) = yield get_tooltip_info(item);
+  Assert.equal(version, undefined, "version should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "class", "disabled-postfix");
   is_element_hidden(el, "disabled-postfix should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "class", "update-postfix");
   is_element_hidden(el, "update-postfix should be hidden.");
   el = item.ownerDocument.getAnonymousElementByAttribute(item, "class", "experiment-bullet");
   is_element_visible(el, "experiment-bullet should be visible.");
 
   // Install an "older" experiment.
--- a/toolkit/mozapps/extensions/test/browser/browser_list.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_list.js
@@ -27,20 +27,17 @@ var gLWTheme = {
                 author: "Pixel Pusher",
                 homepageURL: "http://mochi.test:8888/data/index.html",
                 headerURL: "http://mochi.test:8888/data/header.png",
                 footerURL: "http://mochi.test:8888/data/footer.png",
                 previewURL: "http://mochi.test:8888/data/preview.png",
                 iconURL: "http://mochi.test:8888/data/icon.png"
               };
 
-
-function test() {
-  waitForExplicitFinish();
-
+add_task(function*() {
   gProvider = new MockProvider();
 
   gProvider.createAddons([{
     id: "addon1@tests.mozilla.org",
     name: "Test add-on",
     version: "1.0",
     description: "A test add-on",
     longDescription: " A longer description",
@@ -103,28 +100,19 @@ function test() {
   }, {
     id: "addon11@tests.mozilla.org",
     name: "Test add-on 11",
     signedState: AddonManager.SIGNEDSTATE_MISSING,
     isActive: false,
     appDisabled: true,
   }]);
 
-  open_manager(null, function(aWindow) {
-    gManagerWindow = aWindow;
-    gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-    run_next_test();
-  });
-}
-
-function end_test() {
-  close_manager(gManagerWindow, function() {
-    finish();
-  });
-}
+  gManagerWindow = yield open_manager(null);
+  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
+});
 
 function get_test_items() {
   var tests = "@tests.mozilla.org";
 
   var items = {};
   var item = gManagerWindow.document.getElementById("addon-list").firstChild;
 
   while (item) {
@@ -142,591 +130,607 @@ function get_node(parent, anonid) {
 }
 
 function get_class_node(parent, cls) {
   return parent.ownerDocument.getAnonymousElementByAttribute(parent, "class", cls);
 }
 
 // Check that the list appears to have displayed correctly and trigger some
 // changes
-add_test(function() {
-  gCategoryUtilities.openType("extension", function() {
-    let items = get_test_items();
-    is(Object.keys(items).length, 11, "Should be the right number of add-ons installed");
+add_task(function*() {
+  yield gCategoryUtilities.openType("extension");
+  let items = get_test_items();
+  is(Object.keys(items).length, 11, "Should be the right number of add-ons installed");
 
-    info("Addon 1");
-    let addon = items["Test add-on"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on", "Name should be correct");
-    is_element_visible(get_node(addon, "version"), "Version should be visible");
-    is(get_node(addon, "version").value, "1.0", "Version should be correct");
-    is_element_visible(get_node(addon, "description"), "Description should be visible");
-    is(get_node(addon, "description").value, "A test add-on", "Description should be correct");
-    is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
-    is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
-    is(get_node(addon, "date-updated").value, formatDate(gDate), "Update date should be correct");
+  info("Addon 1");
+  let addon = items["Test add-on"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  let { name, version } = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on", "Name should be correct");
+  is(name, "Test add-on", "Tooltip name should be correct");
+  is(version, "1.0", "Tooltip version should be correct");
+  is(get_node(addon, "description").value, "A test add-on", "Description should be correct");
+  is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
+  is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
+  is(get_node(addon, "date-updated").value, formatDate(gDate), "Update date should be correct");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Disabling");
-    EventUtils.synthesizeMouseAtCenter(get_node(addon, "disable-btn"), {}, gManagerWindow);
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Disabling");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "disable-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be visible");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-    is(get_node(addon, "pending").textContent, "Test add-on will be disabled after you restart " + gApp + ".", "Pending message should be correct");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be visible");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on will be disabled after you restart " + gApp + ".", "Pending message should be correct");
 
-    info("Addon 2");
-    addon = items["Test add-on 2"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 2", "Name should be correct");
-    is_element_visible(get_node(addon, "version"), "Version should be visible");
-    is(get_node(addon, "version").value, "2.0", "Version should be correct");
-    is_element_hidden(get_node(addon, "description"), "Description should be hidden");
-    is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
-    is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
-    is(get_node(addon, "date-updated").value, "Unknown", "Date should be correct");
+  info("Addon 2");
+  addon = items["Test add-on 2"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 2", "Name should be correct");
+  is(name, "Test add-on 2", "Tooltip name should be correct");
+  is(version, "2.0", "Tooltip version should be correct");
+  is_element_hidden(get_node(addon, "description"), "Description should be hidden");
+  is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
+  is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
+  is(get_node(addon, "date-updated").value, "Unknown", "Date should be correct");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Enabling");
-    EventUtils.synthesizeMouseAtCenter(get_node(addon, "enable-btn"), {}, gManagerWindow);
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Enabling");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "enable-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-    is(get_node(addon, "pending").textContent, "Test add-on 2 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on 2 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
 
-    info("Addon 3");
-    addon = items["Test add-on 3"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 3", "Name should be correct");
-    is_element_hidden(get_node(addon, "version"), "Version should be hidden");
+  info("Addon 3");
+  addon = items["Test add-on 3"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 3", "Name should be correct");
+  is(name, "Test add-on 3", "Tooltip name should be correct");
+  is(version, undefined, "Tooltip version should be hidden");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_hidden(get_node(addon, "remove-btn"), "Remove button should be hidden");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_hidden(get_node(addon, "remove-btn"), "Remove button should be hidden");
 
-    is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
-    is(get_node(addon, "warning").textContent, "Test add-on 3 is incompatible with " + gApp + " " + gVersion + ".", "Warning message should be correct");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
+  is(get_node(addon, "warning").textContent, "Test add-on 3 is incompatible with " + gApp + " " + gVersion + ".", "Warning message should be correct");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Addon 4");
-    addon = items["Test add-on 4"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 4", "Name should be correct");
+  info("Addon 4");
+  addon = items["Test add-on 4"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 4", "Name should be correct");
+  is(name, "Test add-on 4", "Tooltip name should be correct");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
-    is(get_node(addon, "warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
-    is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
-    is(get_node(addon, "warning-link").value, "More Information", "Warning link text should be correct");
-    is(get_node(addon, "warning-link").href, "http://example.com/addon4@tests.mozilla.org", "Warning link should be correct");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
+  is(get_node(addon, "warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
+  is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
+  is(get_node(addon, "warning-link").value, "More Information", "Warning link text should be correct");
+  is(get_node(addon, "warning-link").href, "http://example.com/addon4@tests.mozilla.org", "Warning link should be correct");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Enabling");
-    EventUtils.synthesizeMouseAtCenter(get_node(addon, "enable-btn"), {}, gManagerWindow);
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Enabling");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "enable-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-    is(get_node(addon, "pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
 
-    info("Addon 5");
-    addon = items["Test add-on 5"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 5", "Name should be correct");
+  info("Addon 5");
+  addon = items["Test add-on 5"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 5", "Name should be correct");
+  is(name, "Test add-on 5", "Tooltip name should be correct");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_visible(get_node(addon, "error"), "Error message should be visible");
-    is(get_node(addon, "error").textContent, "Test add-on 5 has been disabled due to security or stability issues.", "Error message should be correct");
-    is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
-    is(get_node(addon, "error-link").value, "More Information", "Error link text should be correct");
-    is(get_node(addon, "error-link").href, "http://example.com/addon5@tests.mozilla.org", "Error link should be correct");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_visible(get_node(addon, "error"), "Error message should be visible");
+  is(get_node(addon, "error").textContent, "Test add-on 5 has been disabled due to security or stability issues.", "Error message should be correct");
+  is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
+  is(get_node(addon, "error-link").value, "More Information", "Error link text should be correct");
+  is(get_node(addon, "error-link").href, "http://example.com/addon5@tests.mozilla.org", "Error link should be correct");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Addon 6");
-    addon = items["Test add-on 6"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 6", "Name should be correct");
-    is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
+  info("Addon 6");
+  addon = items["Test add-on 6"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 6", "Name should be correct");
+  is(name, "Test add-on 6", "Tooltip name should be correct");
+  is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be visible");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be visible");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+
+  info("Disabling");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "disable-btn"), {}, gManagerWindow);
+  is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
 
-    info("Disabling");
-    EventUtils.synthesizeMouseAtCenter(get_node(addon, "disable-btn"), {}, gManagerWindow);
-    is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be visible");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be visible");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  info("Addon 7");
+  addon = items["Test add-on 7"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 7", "Name should be correct");
+  is(name, "Test add-on 7", "Tooltip name should be correct");
 
-    info("Addon 7");
-    addon = items["Test add-on 7"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 7", "Name should be correct");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_visible(get_node(addon, "warning"), "Warning message should be hidden");
+  is(get_node(addon, "warning").textContent, "An important update is available for Test add-on 7.", "Warning message should be correct");
+  is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
+  is(get_node(addon, "warning-link").value, "Update Now", "Warning link text should be correct");
+  is(get_node(addon, "warning-link").href, gPluginURL, "Warning link should be correct");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    is_element_visible(get_node(addon, "warning"), "Warning message should be hidden");
-    is(get_node(addon, "warning").textContent, "An important update is available for Test add-on 7.", "Warning message should be correct");
-    is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
-    is(get_node(addon, "warning-link").value, "Update Now", "Warning link text should be correct");
-    is(get_node(addon, "warning-link").href, gPluginURL, "Warning link should be correct");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  info("Disabling");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "disable-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    info("Disabling");
-    EventUtils.synthesizeMouseAtCenter(get_node(addon, "disable-btn"), {}, gManagerWindow);
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be visible");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on 7 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be visible");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-    is(get_node(addon, "pending").textContent, "Test add-on 7 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
+  info("Addon 8");
+  addon = items["Test add-on 8"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 8", "Name should be correct");
+  is(name, "Test add-on 8", "Tooltip name should be correct");
 
-    info("Addon 8");
-    addon = items["Test add-on 8"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 8", "Name should be correct");
-
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_visible(get_node(addon, "error"), "Error message should be visible");
-    is(get_node(addon, "error").textContent, "Test add-on 8 is known to be vulnerable and should be updated.", "Error message should be correct");
-    is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
-    is(get_node(addon, "error-link").value, "Update Now", "Error link text should be correct");
-    is(get_node(addon, "error-link").href, "http://example.com/addon8@tests.mozilla.org", "Error link should be correct");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_visible(get_node(addon, "error"), "Error message should be visible");
+  is(get_node(addon, "error").textContent, "Test add-on 8 is known to be vulnerable and should be updated.", "Error message should be correct");
+  is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
+  is(get_node(addon, "error-link").value, "Update Now", "Error link text should be correct");
+  is(get_node(addon, "error-link").href, "http://example.com/addon8@tests.mozilla.org", "Error link should be correct");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Addon 9");
-    addon = items["Test add-on 9"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 9", "Name should be correct");
+  info("Addon 9");
+  addon = items["Test add-on 9"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 9", "Name should be correct");
+  is(name, "Test add-on 9", "Tooltip name should be correct");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_visible(get_node(addon, "error"), "Error message should be visible");
-    is(get_node(addon, "error").textContent, "Test add-on 9 is known to be vulnerable. Use with caution.", "Error message should be correct");
-    is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
-    is(get_node(addon, "error-link").value, "More Information", "Error link text should be correct");
-    is(get_node(addon, "error-link").href, "http://example.com/addon9@tests.mozilla.org", "Error link should be correct");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_visible(get_node(addon, "error"), "Error message should be visible");
+  is(get_node(addon, "error").textContent, "Test add-on 9 is known to be vulnerable. Use with caution.", "Error message should be correct");
+  is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
+  is(get_node(addon, "error-link").value, "More Information", "Error link text should be correct");
+  is(get_node(addon, "error-link").href, "http://example.com/addon9@tests.mozilla.org", "Error link should be correct");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Addon 10");
-    addon = items["Test add-on 10"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 10", "Name should be correct");
+  info("Addon 10");
+  addon = items["Test add-on 10"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 10", "Name should be correct");
+  is(name, "Test add-on 10", "Tooltip name should be correct");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
-    is(get_node(addon, "warning").textContent, "Test add-on 10 could not be verified for use in " + gApp + ". Proceed with caution.", "Warning message should be correct");
-    is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
-    is(get_node(addon, "warning-link").value, "More Information", "Warning link text should be correct");
-    is(get_node(addon, "warning-link").href, infoURL, "Warning link should be correct");
-    is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-    is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
+  is(get_node(addon, "warning").textContent, "Test add-on 10 could not be verified for use in " + gApp + ". Proceed with caution.", "Warning message should be correct");
+  is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
+  is(get_node(addon, "warning-link").value, "More Information", "Warning link text should be correct");
+  is(get_node(addon, "warning-link").href, infoURL, "Warning link should be correct");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Addon 11");
-    addon = items["Test add-on 11"];
-    addon.parentNode.ensureElementIsVisible(addon);
-    is(get_node(addon, "name").value, "Test add-on 11", "Name should be correct");
+  info("Addon 11");
+  addon = items["Test add-on 11"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 11", "Name should be correct");
+  is(name, "Test add-on 11", "Tooltip name should be correct");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-    is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-    is_element_visible(get_node(addon, "error"), "Error message should be visible");
-    is(get_node(addon, "error").textContent, "Test add-on 11 could not be verified for use in " + gApp + " and has been disabled.", "Error message should be correct");
-    is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
-    is(get_node(addon, "error-link").value, "More Information", "Error link text should be correct");
-    is(get_node(addon, "error-link").href, infoURL, "Error link should be correct");
-    is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_visible(get_node(addon, "error"), "Error message should be visible");
+  is(get_node(addon, "error").textContent, "Test add-on 11 could not be verified for use in " + gApp + " and has been disabled.", "Error message should be correct");
+  is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
+  is(get_node(addon, "error-link").value, "More Information", "Error link text should be correct");
+  is(get_node(addon, "error-link").href, infoURL, "Error link should be correct");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-    info("Filter for disabled unsigned extensions");
-    let filterButton = gManagerWindow.document.getElementById("show-disabled-unsigned-extensions");
-    let showAllButton = gManagerWindow.document.getElementById("show-all-extensions");
-    let signingInfoUI = gManagerWindow.document.getElementById("disabled-unsigned-addons-info");
-    is_element_visible(filterButton, "Button for showing disabled unsigned extensions should be visible");
-    is_element_hidden(showAllButton, "Button for showing all extensions should be hidden");
-    is_element_hidden(signingInfoUI, "Signing info UI should be hidden");
+  info("Filter for disabled unsigned extensions");
+  let filterButton = gManagerWindow.document.getElementById("show-disabled-unsigned-extensions");
+  let showAllButton = gManagerWindow.document.getElementById("show-all-extensions");
+  let signingInfoUI = gManagerWindow.document.getElementById("disabled-unsigned-addons-info");
+  is_element_visible(filterButton, "Button for showing disabled unsigned extensions should be visible");
+  is_element_hidden(showAllButton, "Button for showing all extensions should be hidden");
+  is_element_hidden(signingInfoUI, "Signing info UI should be hidden");
 
-    filterButton.click();
-    wait_for_view_load(gManagerWindow, () => {
-      is_element_hidden(filterButton, "Button for showing disabled unsigned extensions should be hidden");
-      is_element_visible(showAllButton, "Button for showing all extensions should be visible");
-      is_element_visible(signingInfoUI, "Signing info UI should be visible");
+  filterButton.click();
+
+  yield new Promise(resolve => wait_for_view_load(gManagerWindow, resolve));
 
-      items = get_test_items();
-      is(Object.keys(items).length, 1, "Only one add-on should be shown");
-      is(Object.keys(items)[0], "Test add-on 11", "The disabled unsigned extension should be shown");
+  is_element_hidden(filterButton, "Button for showing disabled unsigned extensions should be hidden");
+  is_element_visible(showAllButton, "Button for showing all extensions should be visible");
+  is_element_visible(signingInfoUI, "Signing info UI should be visible");
 
-      showAllButton.click();
-      wait_for_view_load(gManagerWindow, () => {
-        items = get_test_items();
-        is(Object.keys(items).length, 11, "All add-ons should be shown again");
-        is_element_visible(filterButton, "Button for showing disabled unsigned extensions should be visible again");
-        is_element_hidden(showAllButton, "Button for showing all extensions should be hidden again");
-        is_element_hidden(signingInfoUI, "Signing info UI should be hidden again");
+  items = get_test_items();
+  is(Object.keys(items).length, 1, "Only one add-on should be shown");
+  is(Object.keys(items)[0], "Test add-on 11", "The disabled unsigned extension should be shown");
+
+  showAllButton.click();
 
-        run_next_test();
-      });
-    });
-  });
+  yield new Promise(resolve => wait_for_view_load(gManagerWindow, resolve));
+
+  items = get_test_items();
+  is(Object.keys(items).length, 11, "All add-ons should be shown again");
+  is_element_visible(filterButton, "Button for showing disabled unsigned extensions should be visible again");
+  is_element_hidden(showAllButton, "Button for showing all extensions should be hidden again");
+  is_element_hidden(signingInfoUI, "Signing info UI should be hidden again");
 });
 
 // Check the add-ons are now in the right state
-add_test(function() {
-  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
-                               "addon2@tests.mozilla.org",
-                               "addon4@tests.mozilla.org",
-                               "addon6@tests.mozilla.org"],
-                               function([a1, a2, a4, a6]) {
-    is(a1.pendingOperations, AddonManager.PENDING_DISABLE, "Add-on 1 should be pending disable");
-    is(a2.pendingOperations, AddonManager.PENDING_ENABLE, "Add-on 2 should be pending enable");
-    is(a4.pendingOperations, AddonManager.PENDING_ENABLE, "Add-on 4 should be pending enable");
+add_task(function*() {
+  let [a1, a2, a4, a6] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org",
+                                                   "addon2@tests.mozilla.org",
+                                                   "addon4@tests.mozilla.org",
+                                                   "addon6@tests.mozilla.org"]);
 
-    run_next_test();
-  });
+  is(a1.pendingOperations, AddonManager.PENDING_DISABLE, "Add-on 1 should be pending disable");
+  is(a2.pendingOperations, AddonManager.PENDING_ENABLE, "Add-on 2 should be pending enable");
+  is(a4.pendingOperations, AddonManager.PENDING_ENABLE, "Add-on 4 should be pending enable");
 });
 
 // Reload the list to make sure the changes are still pending and that undoing
 // works
-add_test(function() {
-  gCategoryUtilities.openType("plugin", function() {
-    gCategoryUtilities.openType("extension", function() {
-      let items = get_test_items();
-      is(Object.keys(items).length, 11, "Should be the right number of add-ons installed");
+add_task(function*() {
+  yield gCategoryUtilities.openType("plugin");
+  yield gCategoryUtilities.openType("extension");
 
-      info("Addon 1");
-      let addon = items["Test add-on"];
-      addon.parentNode.ensureElementIsVisible(addon);
-      is(get_node(addon, "name").value, "Test add-on", "Name should be correct");
-      is_element_visible(get_node(addon, "version"), "Version should be visible");
-      is(get_node(addon, "version").value, "1.0", "Version should be correct");
-      is_element_visible(get_node(addon, "description"), "Description should be visible");
-      is(get_node(addon, "description").value, "A test add-on", "Description should be correct");
-      is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
-      is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
-      is(get_node(addon, "date-updated").value, formatDate(gDate), "Update date should be correct");
+  let items = get_test_items();
+  is(Object.keys(items).length, 11, "Should be the right number of add-ons installed");
 
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-      is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
-
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-      is(get_node(addon, "pending").textContent, "Test add-on will be disabled after you restart " + gApp + ".", "Pending message should be correct");
+  info("Addon 1");
+  let addon = items["Test add-on"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  let { name, version } = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on", "Name should be correct");
+  is(name, "Test add-on", "Tooltip name should be correct");
+  is(version, "1.0", "Tooltip version should be correct");
+  is_element_visible(get_node(addon, "description"), "Description should be visible");
+  is(get_node(addon, "description").value, "A test add-on", "Description should be correct");
+  is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
+  is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
+  is(get_node(addon, "date-updated").value, formatDate(gDate), "Update date should be correct");
 
-      info("Undoing");
-      EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-      is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on will be disabled after you restart " + gApp + ".", "Pending message should be correct");
+
+  info("Undoing");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      info("Addon 2");
-      addon = items["Test add-on 2"];
-      addon.parentNode.ensureElementIsVisible(addon);
-      is(get_node(addon, "name").value, "Test add-on 2", "Name should be correct");
-      is_element_visible(get_node(addon, "version"), "Version should be visible");
-      is(get_node(addon, "version").value, "2.0", "Version should be correct");
-      is_element_hidden(get_node(addon, "description"), "Description should be hidden");
-      is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
-      is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
-      is(get_node(addon, "date-updated").value, "Unknown", "Date should be correct");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-      is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Addon 2");
+  addon = items["Test add-on 2"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 2", "Name should be correct");
+  is(name, "Test add-on 2", "Tooltip name should be correct");
+  is(version, "2.0", "Tooltip version should be correct");
+  is_element_hidden(get_node(addon, "description"), "Description should be hidden");
+  is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
+  is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
+  is(get_node(addon, "date-updated").value, "Unknown", "Date should be correct");
 
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-      is(get_node(addon, "pending").textContent, "Test add-on 2 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      info("Undoing");
-      EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-      is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on 2 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
 
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  info("Undoing");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      info("Addon 4");
-      addon = items["Test add-on 4"];
-      addon.parentNode.ensureElementIsVisible(addon);
-      is(get_node(addon, "name").value, "Test add-on 4", "Name should be correct");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-      is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Addon 4");
+  addon = items["Test add-on 4"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 4", "Name should be correct");
+  is(name, "Test add-on 4", "Tooltip name should be correct");
 
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-      is(get_node(addon, "pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      info("Undoing");
-      EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-      is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
+
+  info("Undoing");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
-      is(get_node(addon, "warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
-      is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
-      is(get_node(addon, "warning-link").value, "More Information", "Warning link text should be correct");
-      is(get_node(addon, "warning-link").href, "http://example.com/addon4@tests.mozilla.org", "Warning link should be correct");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
-
-      info("Addon 6");
-      addon = items["Test add-on 6"];
-      addon.parentNode.ensureElementIsVisible(addon);
-      is(get_node(addon, "name").value, "Test add-on 6", "Name should be correct");
-      is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
+  is_element_visible(get_node(addon, "warning"), "Warning message should be visible");
+  is(get_node(addon, "warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
+  is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
+  is(get_node(addon, "warning-link").value, "More Information", "Warning link text should be correct");
+  is(get_node(addon, "warning-link").href, "http://example.com/addon4@tests.mozilla.org", "Warning link should be correct");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-      is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Addon 6");
+  addon = items["Test add-on 6"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 6", "Name should be correct");
+  is(name, "Test add-on 6", "Tooltip name should be correct");
+  is_element_visible(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be visible");
 
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be visible");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      info("Enabling");
-      EventUtils.synthesizeMouseAtCenter(get_node(addon, "enable-btn"), {}, gManagerWindow);
-      is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be visible");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-      is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Enabling");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "enable-btn"), {}, gManagerWindow);
+  is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
+
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be visible");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be visible");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
-      info("Addon 7");
-      addon = items["Test add-on 7"];
-      addon.parentNode.ensureElementIsVisible(addon);
-      is(get_node(addon, "name").value, "Test add-on 7", "Name should be correct");
-
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
-      is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Addon 7");
+  addon = items["Test add-on 7"];
+  addon.parentNode.ensureElementIsVisible(addon);
+  ({ name, version }) = yield get_tooltip_info(addon);
+  is(get_node(addon, "name").value, "Test add-on 7", "Name should be correct");
+  is(name, "Test add-on 7", "Tooltip name should be correct");
 
-      is_element_hidden(get_node(addon, "warning"), "Warning message should be visible");
-      is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
-      is(get_node(addon, "pending").textContent, "Test add-on 7 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+
+  is_element_hidden(get_node(addon, "warning"), "Warning message should be visible");
+  is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_visible(get_node(addon, "pending"), "Pending message should be visible");
+  is(get_node(addon, "pending").textContent, "Test add-on 7 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
 
-      info("Undoing");
-      EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
-      is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-      is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-      is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-      is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Undoing");
+  EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-      is_element_visible(get_node(addon, "warning"), "Warning message should be hidden");
-      is(get_node(addon, "warning").textContent, "An important update is available for Test add-on 7.", "Warning message should be correct");
-      is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
-      is(get_node(addon, "warning-link").value, "Update Now", "Warning link text should be correct");
-      is(get_node(addon, "warning-link").href, gPluginURL, "Warning link should be correct");
-      is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
-      is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
-      is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
-
-      run_next_test();
-    });
-  });
+  is_element_visible(get_node(addon, "warning"), "Warning message should be hidden");
+  is(get_node(addon, "warning").textContent, "An important update is available for Test add-on 7.", "Warning message should be correct");
+  is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible");
+  is(get_node(addon, "warning-link").value, "Update Now", "Warning link text should be correct");
+  is(get_node(addon, "warning-link").href, gPluginURL, "Warning link should be correct");
+  is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
+  is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
+  is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 });
 
 // Check the add-ons are now in the right state
-add_test(function() {
-  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
-                               "addon2@tests.mozilla.org",
-                               "addon4@tests.mozilla.org"],
-                               function([a1, a2, a4]) {
-    is(a1.pendingOperations, 0, "Add-on 1 should not have any pending operations");
-    is(a2.pendingOperations, 0, "Add-on 1 should not have any pending operations");
-    is(a4.pendingOperations, 0, "Add-on 1 should not have any pending operations");
+add_task(function*() {
+  let [a1, a2, a4] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org",
+                                               "addon2@tests.mozilla.org",
+                                               "addon4@tests.mozilla.org"]);
 
-    run_next_test();
-  });
+  is(a1.pendingOperations, 0, "Add-on 1 should not have any pending operations");
+  is(a2.pendingOperations, 0, "Add-on 1 should not have any pending operations");
+  is(a4.pendingOperations, 0, "Add-on 1 should not have any pending operations");
 });
 
 // Check that upgrades with onExternalInstall take effect immediately
-add_test(function() {
+add_task(function*() {
   gProvider.createAddons([{
     id: "addon1@tests.mozilla.org",
     name: "Test add-on replacement",
     version: "2.0",
     description: "A test add-on with a new description",
     updateDate: gDate,
     operationsRequiringRestart: AddonManager.OP_NEEDS_RESTART_NONE
   }]);
 
   let items = get_test_items();
   is(Object.keys(items).length, 11, "Should be the right number of add-ons installed");
 
   let addon = items["Test add-on replacement"];
   addon.parentNode.ensureElementIsVisible(addon);
+  let { name, version } = yield get_tooltip_info(addon);
   is(get_node(addon, "name").value, "Test add-on replacement", "Name should be correct");
-  is_element_visible(get_node(addon, "version"), "Version should be visible");
-  is(get_node(addon, "version").value, "2.0", "Version should be correct");
+  is(name, "Test add-on replacement", "Tooltip name should be correct");
+  is(version, "2.0", "Tooltip version should be correct");
   is_element_visible(get_node(addon, "description"), "Description should be visible");
   is(get_node(addon, "description").value, "A test add-on with a new description", "Description should be correct");
   is_element_hidden(get_class_node(addon, "disabled-postfix"), "Disabled postfix should be hidden");
   is_element_hidden(get_class_node(addon, "update-postfix"), "Update postfix should be hidden");
   is(get_node(addon, "date-updated").value, formatDate(gDate), "Update date should be correct");
 
   is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
   is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
   is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
   is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
   is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
   is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
   is_element_hidden(get_node(addon, "error"), "Error message should be hidden");
   is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden");
   is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
-
-  run_next_test();
 });
 
 // Check that focus changes correctly move around the selected list item
-add_test(function() {
+add_task(function*() {
   function is_node_in_list(aNode) {
     var list = gManagerWindow.document.getElementById("addon-list");
 
     while (aNode && aNode != list)
       aNode = aNode.parentNode;
 
     if (aNode)
       return true;
@@ -769,69 +773,65 @@ add_test(function() {
 
   EventUtils.synthesizeKey("VK_TAB", { shiftKey: true }, gManagerWindow);
   ok(!is_node_in_list(fm.focusedElement), "Focus should be outside the list");
 
   try {
     Services.prefs.clearUserPref("accessibility.tabfocus_applies_to_xul");
   }
   catch (e) { }
-
-  run_next_test();
 });
 
 
-add_test(function() {
+add_task(function*() {
   info("Enabling lightweight theme");
   LightweightThemeManager.currentTheme = gLWTheme;
   
   gManagerWindow.loadView("addons://list/theme");
-  wait_for_view_load(gManagerWindow, function() {
-    var addon = get_addon_element(gManagerWindow, "4@personas.mozilla.org");
+  yield new Promise(resolve => wait_for_view_load(gManagerWindow, resolve));
+
+  var addon = get_addon_element(gManagerWindow, "4@personas.mozilla.org");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
-
-    info("Disabling lightweight theme");
-    LightweightThemeManager.currentTheme = null;
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
-    is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
-    is_element_visible(get_node(addon, "enable-btn"), "Enable button should be hidden");
-    is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be visible");
-    is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+  info("Disabling lightweight theme");
+  LightweightThemeManager.currentTheme = null;
 
-    AddonManager.getAddonByID("4@personas.mozilla.org", function(aAddon) {
-      aAddon.uninstall();
-      run_next_test();
-    });
-  });
+  is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
+  is_element_visible(get_node(addon, "enable-btn"), "Enable button should be hidden");
+  is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be visible");
+  is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
+
+  let [aAddon] = yield promiseAddonsByIDs(["4@personas.mozilla.org"]);
+  aAddon.uninstall();
 });
 
 // Check that onPropertyChanges for appDisabled updates the UI
-add_test(function() {
+add_task(function*() {
   info("Checking that onPropertyChanges for appDisabled updates the UI");
 
-  AddonManager.getAddonByID("addon2@tests.mozilla.org", function(aAddon) {
-    aAddon.userDisabled = true;
-    aAddon.isCompatible = true;
-    aAddon.appDisabled = false;
+  let [aAddon] = yield promiseAddonsByIDs(["addon2@tests.mozilla.org"]);
+  aAddon.userDisabled = true;
+  aAddon.isCompatible = true;
+  aAddon.appDisabled = false;
 
-    gManagerWindow.loadView("addons://list/extension");
-    wait_for_view_load(gManagerWindow, function() {
-      var el = get_addon_element(gManagerWindow, "addon2@tests.mozilla.org");
+  gManagerWindow.loadView("addons://list/extension");
+  yield new Promise(resolve => wait_for_view_load(gManagerWindow, resolve));
+  var el = get_addon_element(gManagerWindow, "addon2@tests.mozilla.org");
 
-      is(el.getAttribute("active"), "false", "Addon should not be marked as active");
-      is_element_hidden(get_node(el, "warning"), "Warning message should not be visible");
+  is(el.getAttribute("active"), "false", "Addon should not be marked as active");
+  is_element_hidden(get_node(el, "warning"), "Warning message should not be visible");
 
-      info("Making addon incompatible and appDisabled");
-      aAddon.isCompatible = false;
-      aAddon.appDisabled = true;
+  info("Making addon incompatible and appDisabled");
+  aAddon.isCompatible = false;
+  aAddon.appDisabled = true;
 
-      is(el.getAttribute("active"), "false", "Addon should not be marked as active");
-      is_element_visible(get_node(el, "warning"), "Warning message should be visible");
-      is(get_node(el, "warning").textContent, "Test add-on 2 is incompatible with " + gApp + " " + gVersion + ".", "Warning message should be correct");
+  is(el.getAttribute("active"), "false", "Addon should not be marked as active");
+  is_element_visible(get_node(el, "warning"), "Warning message should be visible");
+  is(get_node(el, "warning").textContent, "Test add-on 2 is incompatible with " + gApp + " " + gVersion + ".", "Warning message should be correct");
+});
 
-      run_next_test();
-    });
-  });
+add_task(function*() {
+  return close_manager(gManagerWindow);
 });
--- a/toolkit/mozapps/extensions/test/browser/browser_manualupdates.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_manualupdates.js
@@ -50,33 +50,42 @@ add_test(function() {
   
   is(gCategoryUtilities.isVisible(gAvailableCategory), false, "Available Updates category should still be hidden");
 
   run_next_test();
 });
 
 
 add_test(function() {
+  let finished = 0;
+  function maybeRunNext() {
+    if (++finished == 2)
+      run_next_test();
+  }
+
   gAvailableCategory.addEventListener("CategoryBadgeUpdated", function() {
     gAvailableCategory.removeEventListener("CategoryBadgeUpdated", arguments.callee, false);
     is(gCategoryUtilities.isVisible(gAvailableCategory), true, "Available Updates category should now be visible");
     is(gAvailableCategory.badgeCount, 1, "Badge for Available Updates should now be 1");
-    run_next_test();
+    maybeRunNext();
   }, false);
 
   gCategoryUtilities.openType("extension", function() {
     gProvider.createInstalls([{
       name: "manually updating addon (new and improved!)",
       existingAddon: gProvider.addons[1],
       version: "1.1",
       releaseNotesURI: Services.io.newURI(TESTROOT + "thereIsNoFileHere.xhtml", null, null)
     }]);
 
     var item = get_addon_element(gManagerWindow, "addon2@tests.mozilla.org");
-    is(item._version.value, "1.0", "Should still show the old version in the normal list");
+    get_tooltip_info(item).then(({ version }) => {
+      is(version, "1.0", "Should still show the old version in the tooltip");
+      maybeRunNext();
+    });
   });
 });
 
 
 add_test(function() {
   wait_for_view_load(gManagerWindow, function() {
     is(gManagerWindow.document.getElementById("categories").selectedItem.value, "addons://updates/available", "Available Updates category should now be selected");
     is(gManagerWindow.gViewController.currentViewId, "addons://updates/available", "Available Updates view should be the current view");
@@ -87,76 +96,71 @@ add_test(function() {
 
 
 add_test(function() {
   var list = gManagerWindow.document.getElementById("updates-list");
   is(list.itemCount, 1, "Should be 1 available update listed");
   var item = list.firstChild;
   is(item.mAddon.id, "addon2@tests.mozilla.org", "Update item should be for the manually updating addon");
   
-  // for manual update items, update-related properties are updated asynchronously,
-  // so we poll for one of the expected changes to know when its done
-  function waitForAsyncInit() {
-    if (item._version.value == "1.1") {
-      run_next_test();
-      return;
-    }
-    info("Update item not initialized yet, checking again in 100ms");
-    setTimeout(waitForAsyncInit, 100);
-  }
-  waitForAsyncInit();
+  // The item in the list will be checking for update information asynchronously
+  // so we have to wait for it to complete. Doing the same async request should
+  // make our callback be called later.
+  AddonManager.getAllInstalls(run_next_test);
 });
 
 add_test(function() {
   var list = gManagerWindow.document.getElementById("updates-list");
   var item = list.firstChild;
-  is(item._version.value, "1.1", "Update item should have version number of the update");
-  var postfix = gManagerWindow.document.getAnonymousElementByAttribute(item, "class", "update-postfix");
-  is_element_visible(postfix, "'Update' postfix should be visible");
-  is_element_visible(item._updateAvailable, "");
-  is_element_visible(item._relNotesToggle, "Release notes toggle should be visible");
-  is_element_hidden(item._warning, "Incompatible warning should be hidden");
-  is_element_hidden(item._error, "Blocklist error should be hidden");
+  get_tooltip_info(item).then(({ version }) => {
+    is(version, "1.1", "Update item should have version number of the update");
+    var postfix = gManagerWindow.document.getAnonymousElementByAttribute(item, "class", "update-postfix");
+    is_element_visible(postfix, "'Update' postfix should be visible");
+    is_element_visible(item._updateAvailable, "");
+    is_element_visible(item._relNotesToggle, "Release notes toggle should be visible");
+    is_element_hidden(item._warning, "Incompatible warning should be hidden");
+    is_element_hidden(item._error, "Blocklist error should be hidden");
 
-  info("Opening release notes");
-  item.addEventListener("RelNotesToggle", function() {
-    item.removeEventListener("RelNotesToggle", arguments.callee, false);
-    info("Release notes now open");
-
-    is_element_hidden(item._relNotesLoading, "Release notes loading message should be hidden");
-    is_element_visible(item._relNotesError, "Release notes error message should be visible");
-    is(item._relNotes.childElementCount, 0, "Release notes should be empty");
-
-    info("Closing release notes");
+    info("Opening release notes");
     item.addEventListener("RelNotesToggle", function() {
       item.removeEventListener("RelNotesToggle", arguments.callee, false);
-      info("Release notes now closed");
-      info("Setting Release notes URI to something that should load");
-      gProvider.installs[0].releaseNotesURI = Services.io.newURI(TESTROOT + "releaseNotes.xhtml", null, null)
+      info("Release notes now open");
 
-      info("Re-opening release notes");
+      is_element_hidden(item._relNotesLoading, "Release notes loading message should be hidden");
+      is_element_visible(item._relNotesError, "Release notes error message should be visible");
+      is(item._relNotes.childElementCount, 0, "Release notes should be empty");
+
+      info("Closing release notes");
       item.addEventListener("RelNotesToggle", function() {
         item.removeEventListener("RelNotesToggle", arguments.callee, false);
-        info("Release notes now open");
+        info("Release notes now closed");
+        info("Setting Release notes URI to something that should load");
+        gProvider.installs[0].releaseNotesURI = Services.io.newURI(TESTROOT + "releaseNotes.xhtml", null, null)
+
+        info("Re-opening release notes");
+        item.addEventListener("RelNotesToggle", function() {
+          item.removeEventListener("RelNotesToggle", arguments.callee, false);
+          info("Release notes now open");
 
-        is_element_hidden(item._relNotesLoading, "Release notes loading message should be hidden");
-        is_element_hidden(item._relNotesError, "Release notes error message should be hidden");
-        isnot(item._relNotes.childElementCount, 0, "Release notes should have been inserted into container");
-        run_next_test();
+          is_element_hidden(item._relNotesLoading, "Release notes loading message should be hidden");
+          is_element_hidden(item._relNotesError, "Release notes error message should be hidden");
+          isnot(item._relNotes.childElementCount, 0, "Release notes should have been inserted into container");
+          run_next_test();
+
+        }, false);
+        EventUtils.synthesizeMouseAtCenter(item._relNotesToggle, { }, gManagerWindow);
+        is_element_visible(item._relNotesLoading, "Release notes loading message should be visible");
 
       }, false);
       EventUtils.synthesizeMouseAtCenter(item._relNotesToggle, { }, gManagerWindow);
-      is_element_visible(item._relNotesLoading, "Release notes loading message should be visible");
 
     }, false);
     EventUtils.synthesizeMouseAtCenter(item._relNotesToggle, { }, gManagerWindow);
-
-  }, false);
-  EventUtils.synthesizeMouseAtCenter(item._relNotesToggle, { }, gManagerWindow);
-  is_element_visible(item._relNotesLoading, "Release notes loading message should be visible");
+    is_element_visible(item._relNotesLoading, "Release notes loading message should be visible");
+  });
 });
 
 
 add_test(function() {
   var badgeUpdated = false;
   var installCompleted = false;
 
   gAvailableCategory.addEventListener("CategoryBadgeUpdated", function() {
--- a/toolkit/mozapps/extensions/test/browser/browser_updateid.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_updateid.js
@@ -44,26 +44,30 @@ add_test(function() {
     }]);
     var newAddon = new MockAddon("addon2@tests.mozilla.org");
     newAddon.name = "updated add-on";
     newAddon.version = "2.0";
     newAddon.pendingOperations = AddonManager.PENDING_INSTALL;
     gProvider.installs[0]._addonToInstall = newAddon;
 
     var item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
-    is(item._version.value, "1.0", "Should still show the old version in the normal list");
     var name = gManagerWindow.document.getAnonymousElementByAttribute(item, "anonid", "name");
     is(name.value, "manually updating addon", "Should show the old name in the list");
-    var update = gManagerWindow.document.getAnonymousElementByAttribute(item, "anonid", "update-btn");
-    is_element_visible(update, "Update button should be visible");
+    get_tooltip_info(item).then(({ name, version }) => {
+      is(name, "manually updating addon", "Should show the old name in the tooltip");
+      is(version, "1.0", "Should still show the old version in the tooltip");
 
-    item = get_addon_element(gManagerWindow, "addon2@tests.mozilla.org");
-    is(item, null, "Should not show the new version in the list");
+      var update = gManagerWindow.document.getAnonymousElementByAttribute(item, "anonid", "update-btn");
+      is_element_visible(update, "Update button should be visible");
 
-    run_next_test();
+      item = get_addon_element(gManagerWindow, "addon2@tests.mozilla.org");
+      is(item, null, "Should not show the new version in the list");
+
+      run_next_test();
+    });
   });
 });
 
 add_test(function() {
   var item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
   var update = gManagerWindow.document.getAnonymousElementByAttribute(item, "anonid", "update-btn");
   EventUtils.synthesizeMouseAtCenter(update, { }, gManagerWindow);
 
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -222,16 +222,55 @@ function run_next_test() {
     info("Running test " + gTestsRun + " (" + test.name + ")");
   else
     info("Running test " + gTestsRun);
 
   gTestStart = Date.now();
   executeSoon(() => log_exceptions(test));
 }
 
+let get_tooltip_info = Task.async(function*(addon) {
+  let managerWindow = addon.ownerDocument.defaultView;
+
+  // The popup code uses a triggering event's target to set the
+  // document.tooltipNode property.
+  let nameNode = addon.ownerDocument.getAnonymousElementByAttribute(addon, "anonid", "name");
+  let event = new managerWindow.CustomEvent("TriggerEvent");
+  nameNode.dispatchEvent(event);
+
+  let tooltip = managerWindow.document.getElementById("addonitem-tooltip");
+
+  let promise = BrowserTestUtils.waitForEvent(tooltip, "popupshown");
+  tooltip.openPopup(nameNode, "after_start", 0, 0, false, false, event);
+  yield promise;
+
+  let tiptext = tooltip.label;
+
+  promise = BrowserTestUtils.waitForEvent(tooltip, "popuphidden");
+  tooltip.hidePopup();
+  yield promise;
+
+  let expectedName = addon.getAttribute("name");
+  ok(tiptext.substring(0, expectedName.length), expectedName,
+     "Tooltip should always start with the expected name");
+
+  if (expectedName.length == tiptext.length) {
+    return {
+      name: tiptext,
+      version: undefined
+    };
+  }
+  else {
+    return {
+      name: tiptext.substring(0, expectedName.length),
+      version: tiptext.substring(expectedName.length + 1)
+    };
+  }
+});
+
 function get_addon_file_url(aFilename) {
   try {
     var cr = Cc["@mozilla.org/chrome/chrome-registry;1"].
              getService(Ci.nsIChromeRegistry);
     var fileurl = cr.convertChromeURL(makeURI(CHROMEROOT + "addons/" + aFilename));
     return fileurl.QueryInterface(Ci.nsIFileURL);
   } catch(ex) {
     var jar = getJar(CHROMEROOT + "addons/" + aFilename);
@@ -484,16 +523,21 @@ function is_element_visible(aElement, aM
   ok(!is_hidden(aElement), aMsg || (aElement + " should be visible"));
 }
 
 function is_element_hidden(aElement, aMsg) {
   isnot(aElement, null, "Element should not be null, when checking visibility");
   ok(is_hidden(aElement), aMsg || (aElement + " should be hidden"));
 }
 
+function promiseAddonsByIDs(aIDs) {
+  return new Promise(resolve => {
+    AddonManager.getAddonsByIDs(aIDs, resolve);
+  });
+}
 /**
  * Install an add-on and call a callback when complete.
  *
  * The callback will receive the Addon for the installed add-on.
  */
 function install_addon(path, cb, pathPrefix=TESTROOT) {
   let p = new Promise((resolve, reject) => {
     AddonManager.getInstallForURL(pathPrefix + path, (install) => {