Bug 1446686: Part 1 - Fix browser install tests that rely on non-bootstrapped legacy extensions. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Sat, 17 Mar 2018 16:22:22 -0700
changeset 769606 e04291fc1ffa5886a29d093859e0d1b7a44d9d7c
parent 769184 788710ae8f01a24843db73e4c9b5d6d19e7cfc1d
child 769607 e6893fcc8a7943bee4bc72a71f351a7b43e3d20f
push id103186
push usermaglione.k@gmail.com
push dateMon, 19 Mar 2018 21:29:22 +0000
reviewersaswan
bugs1446686
milestone61.0a1
Bug 1446686: Part 1 - Fix browser install tests that rely on non-bootstrapped legacy extensions. r?aswan Several of these tests are obsolete. They only test non-AMO-signed extensions (which are equivalent to unsigned extensions now), non-restartless extensions (which aren't supported), or specific behaviors of the old XPInstall dialogs (which are essentially unsupported). The rest have been updated to use WebExtensions. MozReview-Commit-ID: CBGTtl5XbG7
browser/base/content/test/general/browser_bug553455.js
browser/base/content/test/webextensions/browser_extension_sideloading.js
toolkit/mozapps/extensions/test/browser/addons/browser_install1_1.xpi
toolkit/mozapps/extensions/test/browser/addons/browser_install1_1/install.rdf
toolkit/mozapps/extensions/test/browser/addons/browser_install1_2.xpi
toolkit/mozapps/extensions/test/browser/addons/browser_install1_2/install.rdf
toolkit/mozapps/extensions/test/browser/addons/browser_installssl.xpi
toolkit/mozapps/extensions/test/browser/addons/browser_installssl/install.rdf
toolkit/mozapps/extensions/test/browser/addons/browser_installssl/manifest.json
toolkit/mozapps/extensions/test/browser/browser.ini
toolkit/mozapps/extensions/test/browser/browser_install.js
toolkit/mozapps/extensions/test/browser/browser_install.rdf
toolkit/mozapps/extensions/test/browser/browser_install1_3.xpi
toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi
toolkit/mozapps/extensions/test/xpinstall/browser.ini
toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_url.js
toolkit/mozapps/extensions/test/xpinstall/browser_bug645699.js
toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js
toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js
toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway.js
toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js
toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway3.js
toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway4.js
toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
toolkit/mozapps/extensions/test/xpinstall/browser_signed_tampered.js
toolkit/mozapps/extensions/test/xpinstall/browser_signed_trigger.js
toolkit/mozapps/extensions/test/xpinstall/browser_signed_untrusted.js
toolkit/mozapps/extensions/test/xpinstall/browser_signed_url.js
toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js
toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js
toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js
toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_url.js
toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js
toolkit/mozapps/extensions/test/xpinstall/browser_whitelist2.js
toolkit/mozapps/extensions/test/xpinstall/browser_whitelist3.js
toolkit/mozapps/extensions/test/xpinstall/browser_whitelist4.js
toolkit/mozapps/extensions/test/xpinstall/browser_whitelist5.js
toolkit/mozapps/extensions/test/xpinstall/browser_whitelist6.js
toolkit/mozapps/extensions/test/xpinstall/browser_whitelist7.js
toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
toolkit/mozapps/extensions/test/xpinstall/head.js
toolkit/mozapps/extensions/test/xpinstall/signed-tampered.xpi
toolkit/mozapps/extensions/test/xpinstall/signed-untrusted.xpi
toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -37,17 +37,17 @@ function getObserverTopic(aNotificationI
     topic = "addon-install-started";
   else if (topic == "addon-install-restart")
     topic = "addon-install-complete";
   else if (topic == "addon-installed")
     topic = "webextension-install-notify";
   return topic;
 }
 
-async function waitForProgressNotification(aPanelOpen = false, aExpectedCount = 1) {
+async function waitForProgressNotification(aPanelOpen = false, aExpectedCount = 1, wantDisabled = true) {
   let notificationId = PROGRESS_NOTIFICATION;
   info("Waiting for " + notificationId + " notification");
 
   let topic = getObserverTopic(notificationId);
 
   let observerPromise = new Promise(resolve => {
     Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
       // Ignore the progress notification unless that is the notification we want
@@ -77,39 +77,42 @@ async function waitForProgressNotificati
 
   info("Saw a notification");
   ok(PopupNotifications.isPanelOpen, "Panel should be open");
   is(PopupNotifications.panel.childNodes.length, aExpectedCount, "Should be the right number of notifications");
   if (PopupNotifications.panel.childNodes.length) {
     let nodes = Array.from(PopupNotifications.panel.childNodes);
     let notification = nodes.find(n => n.id == notificationId + "-notification");
     ok(notification, `Should have seen the right notification`);
-    ok(notification.button.hasAttribute("disabled"),
-       "The install button should be disabled");
+    is(notification.button.hasAttribute("disabled"), wantDisabled,
+       "The install button should be disabled?");
   }
 
   return PopupNotifications.panel;
 }
 
 async function waitForNotification(aId, aExpectedCount = 1) {
   info("Waiting for " + aId + " notification");
 
   let topic = getObserverTopic(aId);
 
-  let observerPromise = new Promise(resolve => {
-    Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
-      // Ignore the progress notification unless that is the notification we want
-      if (aId != PROGRESS_NOTIFICATION &&
-          aTopic == getObserverTopic(PROGRESS_NOTIFICATION)) {
-            return;
-      }
-      Services.obs.removeObserver(observer, topic);
-      resolve();
-    }, topic);
-  });
+  let observerPromise;
+  if (aId !== "addon-webext-permissions") {
+    observerPromise = new Promise(resolve => {
+      Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
+        // Ignore the progress notification unless that is the notification we want
+        if (aId != PROGRESS_NOTIFICATION &&
+            aTopic == getObserverTopic(PROGRESS_NOTIFICATION)) {
+              return;
+        }
+        Services.obs.removeObserver(observer, topic);
+        resolve();
+      }, topic);
+    });
+  }
 
   let panelEventPromise = new Promise(resolve => {
     PopupNotifications.panel.addEventListener("PanelUpdated", function eventListener(e) {
       // Skip notifications that are not the one that we are supposed to be looking for
       if (!e.detail.includes(aId)) {
         return;
       }
       PopupNotifications.panel.removeEventListener("PanelUpdated", eventListener);
@@ -137,19 +140,19 @@ function waitForNotificationClose() {
   return new Promise(resolve => {
     info("Waiting for notification to close");
     PopupNotifications.panel.addEventListener("popuphidden", function() {
       resolve();
     }, {once: true});
   });
 }
 
-async function waitForInstallDialog() {
+async function waitForInstallDialog(id = "addon-webext-permissions") {
   if (Services.prefs.getBoolPref("xpinstall.customConfirmationUI", false)) {
-    let panel = await waitForNotification("addon-install-confirmation");
+    let panel = await waitForNotification(id);
     return panel.childNodes[0];
   }
 
   info("Waiting for install dialog");
 
   let window = await new Promise(resolve => {
     Services.wm.addListener({
       onOpenWindow(aXULWindow) {
@@ -281,31 +284,29 @@ async function test_blockedInstall() {
 
   let dialogPromise = waitForInstallDialog();
   // Click on Allow
   EventUtils.synthesizeMouse(notification.button, 20, 10, {});
   // Notification should have changed to progress notification
   ok(PopupNotifications.isPanelOpen, "Notification should still be open");
   notification = panel.childNodes[0];
   is(notification.id, "addon-progress-notification", "Should have seen the progress notification");
+
   let installDialog = await dialogPromise;
 
-  notificationPromise = waitForNotification("addon-install-restart");
-  acceptInstallDialog(installDialog);
+  notificationPromise = waitForNotification("addon-installed");
+  installDialog.button.click();
   panel = await notificationPromise;
 
-  notification = panel.childNodes[0];
-  is(notification.button.label, "Restart Now", "Should have seen the right button");
-  is(notification.getAttribute("label"),
-     "XPI Test will be installed after you restart " + gApp + ".",
-     "Should have seen the right message");
+  let installs = await getInstalls();
+  is(installs.length, 0, "Should be no pending installs");
 
-  let installs = await getInstalls();
-  is(installs.length, 1, "Should be one pending install");
-  installs[0].cancel();
+  let addon = await AddonManager.getAddonByID("amosigned-xpi@tests.mozilla.org");
+  addon.uninstall();
+
   await removeTab();
 },
 
 async function test_whitelistedInstall() {
   let originalTab = gBrowser.selectedTab;
   let tab;
   gBrowser.selectedTab = originalTab;
   let pm = Services.perms;
@@ -320,29 +321,25 @@ async function test_whitelistedInstall()
                                                 + triggers).then(newTab => tab = newTab);
   await progressPromise;
   let installDialog = await dialogPromise;
   await BrowserTestUtils.waitForCondition(() => !!tab, "tab should be present");
 
   is(gBrowser.selectedTab, tab,
      "tab selected in response to the addon-install-confirmation notification");
 
-  let notificationPromise = waitForNotification("addon-install-restart");
+  let notificationPromise = waitForNotification("addon-installed");
   acceptInstallDialog(installDialog);
-  let panel = await notificationPromise;
-
-  let notification = panel.childNodes[0];
-  is(notification.button.label, "Restart Now", "Should have seen the right button");
-  is(notification.getAttribute("label"),
-     "XPI Test will be installed after you restart " + gApp + ".",
-     "Should have seen the right message");
+  await notificationPromise;
 
   let installs = await getInstalls();
-  is(installs.length, 1, "Should be one pending install");
-  installs[0].cancel();
+  is(installs.length, 0, "Should be no pending installs");
+
+  let addon = await AddonManager.getAddonByID("amosigned-xpi@tests.mozilla.org");
+  addon.uninstall();
 
   Services.perms.remove(makeURI("http://example.com/"), "install");
   await removeTab();
 },
 
 async function test_failedDownload() {
   let pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
@@ -398,30 +395,30 @@ async function test_incompatible() {
     "XPI": "incompatible.xpi"
   }));
   BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "installtrigger.html?" + triggers);
   await progressPromise;
   let panel = await failPromise;
 
   let notification = panel.childNodes[0];
   is(notification.getAttribute("label"),
-     "XPI Test could not be installed because it is not compatible with " +
-     gApp + " " + gVersion + ".",
+     "The add-on downloaded from this site could not be installed because " +
+     "it appears to be corrupt.",
      "Should have seen the right message");
 
   Services.perms.remove(makeURI("http://example.com/"), "install");
   await removeTab();
 },
 
 async function test_restartless() {
   let pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
+  let dialogPromise = waitForInstallDialog("addon-install-confirmation");
   let triggers = encodeURIComponent(JSON.stringify({
     "XPI": "restartless.xpi"
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
   await progressPromise;
   let installDialog = await dialogPromise;
 
@@ -527,17 +524,17 @@ async function test_allUnverified() {
       Services.prefs.getBoolPref("xpinstall.signatures.required", true) ||
       AppConstants.MOZ_REQUIRE_SIGNING) {
         return;
   }
   let pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
+  let dialogPromise = waitForInstallDialog("addon-install-confirmation");
   let triggers = encodeURIComponent(JSON.stringify({
     "Extension XPI": "restartless-unsigned.xpi"
   }));
   BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "installtrigger.html?" + triggers);
   await progressPromise;
   let installDialog = await dialogPromise;
 
   let notification = document.getElementById("addon-install-confirmation-notification");
@@ -559,42 +556,16 @@ async function test_allUnverified() {
     });
   });
   addon.uninstall();
 
   Services.perms.remove(makeURI("http://example.com/"), "install");
   await removeTab();
 },
 
-async function test_url() {
-  let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank");
-  await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
-  gBrowser.loadURI(TESTROOT + "amosigned.xpi");
-  await progressPromise;
-  let installDialog = await dialogPromise;
-
-  let notificationPromise = waitForNotification("addon-install-restart");
-  acceptInstallDialog(installDialog);
-  let panel = await notificationPromise;
-
-  let notification = panel.childNodes[0];
-  is(notification.button.label, "Restart Now", "Should have seen the right button");
-  is(notification.getAttribute("label"),
-     "XPI Test will be installed after you restart " + gApp + ".",
-     "Should have seen the right message");
-
-  let installs = await getInstalls();
-  is(installs.length, 1, "Should be one pending install");
-  installs[0].cancel();
-
-  await removeTab();
-},
-
 async function test_localFile() {
   let cr = Cc["@mozilla.org/chrome/chrome-registry;1"]
              .getService(Ci.nsIChromeRegistry);
   let path;
   try {
     path = cr.convertChromeURL(makeURI(CHROMEROOT + "corrupt.xpi")).spec;
   } catch (ex) {
     path = CHROMEROOT + "corrupt.xpi";
@@ -625,20 +596,20 @@ async function test_localFile() {
 
 async function test_tabClose() {
   if (!Services.prefs.getBoolPref("xpinstall.customConfirmationUI", false)) {
     info("Test skipped due to xpinstall.customConfirmationUI being false.");
     return;
   }
 
   let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
+  let dialogPromise = waitForInstallDialog("addon-install-confirmation");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank");
   await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
-  gBrowser.loadURI(TESTROOT + "amosigned.xpi");
+  gBrowser.loadURI(TESTROOT + "restartless.xpi");
   await progressPromise;
   await dialogPromise;
 
   let installs = await getInstalls();
   is(installs.length, 1, "Should be one pending install");
 
   let closePromise = waitForNotificationClose();
   await BrowserTestUtils.removeTab(gBrowser.selectedTab);
@@ -653,19 +624,19 @@ async function test_tabClose() {
 async function test_tabNavigate() {
   if (!Services.prefs.getBoolPref("xpinstall.customConfirmationUI", false)) {
     return;
   }
   let pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
+  let dialogPromise = waitForInstallDialog("addon-install-confirmation");
   let triggers = encodeURIComponent(JSON.stringify({
-    "Extension XPI": "amosigned.xpi"
+    "Extension XPI": "restartless.xpi"
   }));
   BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "installtrigger.html?" + triggers);
   await progressPromise;
   await dialogPromise;
 
   let closePromise = waitForNotificationClose();
   let loadPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
   gBrowser.loadURI("about:blank");
@@ -681,46 +652,16 @@ async function test_tabNavigate() {
   let installs = await getInstalls();
   is(installs.length, 0, "Should be no pending install");
 
   Services.perms.remove(makeURI("http://example.com/"), "install");
   await loadPromise;
   await BrowserTestUtils.removeTab(gBrowser.selectedTab);
 },
 
-async function test_urlBar() {
-  let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank");
-  await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
-  gURLBar.value = TESTROOT + "amosigned.xpi";
-  gURLBar.focus();
-  EventUtils.synthesizeKey("KEY_Enter");
-
-  await progressPromise;
-  let installDialog = await dialogPromise;
-
-  let notificationPromise = waitForNotification("addon-install-restart");
-  acceptInstallDialog(installDialog);
-  let panel = await notificationPromise;
-
-  let notification = panel.childNodes[0];
-  is(notification.button.label, "Restart Now", "Should have seen the right button");
-  is(notification.getAttribute("label"),
-     "XPI Test will be installed after you restart " + gApp + ".",
-     "Should have seen the right message");
-
-  let installs = await getInstalls();
-  is(installs.length, 1, "Should be one pending install");
-  installs[0].cancel();
-
-  await removeTab();
-},
-
 async function test_wrongHost() {
   let requestedUrl = TESTROOT2 + "enabled.html";
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
 
   let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, requestedUrl);
   gBrowser.loadURI(TESTROOT2 + "enabled.html");
   await loadedPromise;
 
@@ -734,101 +675,16 @@ async function test_wrongHost() {
   is(notification.getAttribute("label"),
      "The add-on downloaded from this site could not be installed " +
      "because it appears to be corrupt.",
      "Should have seen the right message");
 
   await removeTab();
 },
 
-async function test_reload() {
-  let pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
-  let triggers = encodeURIComponent(JSON.stringify({
-    "Unsigned XPI": "amosigned.xpi"
-  }));
-  BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "installtrigger.html?" + triggers);
-  await progressPromise;
-  let installDialog = await dialogPromise;
-
-  let notificationPromise = waitForNotification("addon-install-restart");
-  acceptInstallDialog(installDialog);
-  let panel = await notificationPromise;
-
-  let notification = panel.childNodes[0];
-  is(notification.button.label, "Restart Now", "Should have seen the right button");
-  is(notification.getAttribute("label"),
-     "XPI Test will be installed after you restart " + gApp + ".",
-     "Should have seen the right message");
-
-  function testFail() {
-    ok(false, "Reloading should not have hidden the notification");
-  }
-  PopupNotifications.panel.addEventListener("popuphiding", testFail);
-  let requestedUrl = TESTROOT2 + "enabled.html";
-  let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, requestedUrl);
-  gBrowser.loadURI(TESTROOT2 + "enabled.html");
-  await loadedPromise;
-  PopupNotifications.panel.removeEventListener("popuphiding", testFail);
-
-  let installs = await getInstalls();
-  is(installs.length, 1, "Should be one pending install");
-  installs[0].cancel();
-
-  Services.perms.remove(makeURI("http://example.com/"), "install");
-  await removeTab();
-},
-
-async function test_theme() {
-  let pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
-  let triggers = encodeURIComponent(JSON.stringify({
-    "Theme XPI": "theme.xpi"
-  }));
-  BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "installtrigger.html?" + triggers);
-  await progressPromise;
-  let installDialog = await dialogPromise;
-
-  let notificationPromise = waitForNotification("addon-install-restart");
-  acceptInstallDialog(installDialog);
-  let panel = await notificationPromise;
-
-  let notification = panel.childNodes[0];
-  is(notification.button.label, "Restart Now", "Should have seen the right button");
-  is(notification.getAttribute("label"),
-     "Theme Test will be installed after you restart " + gApp + ".",
-     "Should have seen the right message");
-
-  let addon = await new Promise(resolve => {
-    AddonManager.getAddonByID("{972ce4c6-7e08-4474-a285-3208198ce6fd}", function(result) {
-      resolve(result);
-    });
-  });
-  ok(addon.userDisabled, "Should be switching away from the default theme.");
-  // Undo the pending theme switch
-  addon.userDisabled = false;
-
-  addon = await new Promise(resolve => {
-    AddonManager.getAddonByID("theme-xpi@tests.mozilla.org", function(result) {
-      resolve(result);
-    });
-  });
-  isnot(addon, null, "Test theme will have been installed");
-  addon.uninstall();
-
-  Services.perms.remove(makeURI("http://example.com/"), "install");
-  await removeTab();
-},
-
 async function test_renotifyBlocked() {
   let notificationPromise = waitForNotification("addon-install-blocked");
   let triggers = encodeURIComponent(JSON.stringify({
     "XPI": "amosigned.xpi"
   }));
   BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "installtrigger.html?" + triggers);
   let panel = await notificationPromise;
 
@@ -851,63 +707,16 @@ async function test_renotifyBlocked() {
   closePromise = waitForNotificationClose();
   await BrowserTestUtils.removeTab(gBrowser.selectedTab);
   await closePromise;
 
   installs = await getInstalls();
   is(installs.length, 0, "Should have cancelled the installs");
 },
 
-async function test_renotifyInstalled() {
-  let pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  let progressPromise = waitForProgressNotification();
-  let dialogPromise = waitForInstallDialog();
-  let triggers = encodeURIComponent(JSON.stringify({
-    "XPI": "amosigned.xpi"
-  }));
-  BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "installtrigger.html?" + triggers);
-  await progressPromise;
-  let installDialog = await dialogPromise;
-
-  // Wait for the complete notification
-  let notificationPromise = waitForNotification("addon-install-restart");
-  acceptInstallDialog(installDialog);
-  let panel = await notificationPromise;
-
-  let closePromise = waitForNotificationClose();
-  // hide the panel (this simulates the user dismissing it)
-  panel.hidePopup();
-  await closePromise;
-
-  // Install another
-  await new Promise(resolve => executeSoon(resolve));
-
-  progressPromise = waitForProgressNotification();
-  dialogPromise = waitForInstallDialog();
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-  await progressPromise;
-  installDialog = await dialogPromise;
-
-  info("Timeouts after this probably mean bug 589954 regressed");
-
-  // Wait for the complete notification
-  notificationPromise = waitForNotification("addon-install-restart");
-  acceptInstallDialog(installDialog);
-  await notificationPromise;
-
-  let installs = await getInstalls();
-  is(installs.length, 1, "Should be one pending installs");
-  installs[0].cancel();
-
-  Services.perms.remove(makeURI("http://example.com/"), "install");
-  await removeTab();
-},
-
 async function test_cancel() {
   let pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   let notificationPromise = waitForNotification(PROGRESS_NOTIFICATION);
   let triggers = encodeURIComponent(JSON.stringify({
     "XPI": "slowinstall.sjs?file=amosigned.xpi"
   }));
--- a/browser/base/content/test/webextensions/browser_extension_sideloading.js
+++ b/browser/base/content/test/webextensions/browser_extension_sideloading.js
@@ -26,16 +26,17 @@ async function createWebExtension(detail
 }
 
 async function createXULExtension(details) {
   let xpi = AddonTestUtils.createTempXPIFile({
     "install.rdf": {
       id: details.id,
       name: details.name,
       version: "0.1",
+      bootstrap: true,
       targetApplications: [{
         id: "toolkit@mozilla.org",
         minVersion: "0",
         maxVersion: "*",
       }],
     },
   });
 
deleted file mode 100644
index d6df8f9d0ee83eea0da5403bfd321f155e786e45..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/addons/browser_install1_1/install.rdf
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>install1@tests.mozilla.org</em:id>
-    <em:version>1.0</em:version>
-    <em:bootstrap>true</em:bootstrap>
-    <em:updateURL>http://example.com/browser/toolkit/mozapps/extensions/test/browser/browser_install.rdf</em:updateURL>
-
-    <em:targetApplication>
-      <Description>
-        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
-        <em:minVersion>0.3</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-
-    <em:targetApplication>
-      <Description>
-        <em:id>toolkit@mozilla.org</em:id>
-        <em:minVersion>0</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-
-    <!-- Front End MetaData -->
-    <em:name>Install Tests</em:name>
-
-  </Description>
-</RDF>
deleted file mode 100644
index 5468e6cb0203214f0dc3959d3ef2f679666613b4..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/addons/browser_install1_2/install.rdf
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>install1@tests.mozilla.org</em:id>
-    <em:version>2.0</em:version>
-
-    <em:targetApplication>
-      <Description>
-        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
-        <em:minVersion>0.3</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-
-    <em:targetApplication>
-      <Description>
-        <em:id>toolkit@mozilla.org</em:id>
-        <em:minVersion>0</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-
-    <!-- Front End MetaData -->
-    <em:name>Install Tests</em:name>
-
-  </Description>
-</RDF>
index 999535a974294902dc89052134fb1c89af018cf3..8d23fb88edb0db59e5b86fe84237e5ffe07acf1e
GIT binary patch
literal 4293
zc${^YXHXN`630UoNC+*IfIv`sk$?nHq>2=22`z$j=^aCtqS8bJq!*=1=pCg>=m^q5
znivp~(5v+Nyl>{so#))UXZFMY%$eP@v;QwYqy`Bo1ONa~0GP=iYc4FDk-?||054hq
z;ICV)d-{qZ>e?!zE^ht~&d!!M9%C%W(S8z%!E=&L*eVH-jX5y7p#bVc7bjAE4pHhJ
zR_=e$O&<n@UgyT9(@#&9rXeXJg-0B9C~t)dkF<B(ZEi6?&pf=fbvpTE_Scz57RLN=
z2{X6!Byi}kQSOioPI^9nM^ICbz|2iSG-yH5NCHws!zn@+h-lqY1?5RUGJHQBC;n^!
z%K?x~kicQ%P+B+zh`<!*`v`4H_W%I9TqSV{@gUj@xXRf|5;1jmp1-o0U7L8Sfy@`h
zui==Q5=(>Xe$Dz_l^Qnsu@G{Vsnyxw7<oU~kXpFRx|F1lLou(694aF!-W8>kT=fe?
zad6G=M<O7sj2Xt?+nU8lPgkI_x1Fs^JRT4nq!i7n(A`Ts8eA52C3H3@o|Sc3ee|*>
zOnILyPdQFn1kmC~L@M&Uag6uN1vRnf$z0kQ^LLeJ)YR_w3cf%XQcc5=HcVwNx995q
zE~t&tdGixZqk9NvRC^8}Ckx~kT-Clo3<<8B;$>u6Ubsh@M;90Xmkvy~gKfA;0LUL~
z9#WIH)x$uQfJp+z3{C?2Avk`_Z;d^x_q|+r7&zLrsFhY)KV!GY=eoaB)6PlYYuY5h
z)~nvFt20=0XL&VpU+mq+sG(Kkk3ApWPG<6V4z$?%MA}*~i~tI3;{E2;kUC$l7uvSz
zFZS6DMk;cVmj+IEWM!Isd~9KHA0~4lF1DzPFIphq+|?hSQPtU7Wtdn*R0|tshK71K
zZ(8B+3AK}s;%)hkBXoSMn&c~XGNOAj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jFJv
zf6;M?eKk=Z?4^7=KBgvLlB^!7@Y6BAkAJ=yGM}E*0uL+F;t2O;(+lHCi+F+eGtd?R
z=HaN9P8s?%SY|B)Sd*@KgHMcwf&4UWLHm5g`9pDR&g~l!G>Z!Ah5FJCZ0Xnc@7Ods
ziFB{)Cb_X6gH^-HTA7g=M8pu1e+Tye#Zw}{zu^0SD**o8pnr!h^&fWqv-zKf`Mdc!
l^*`I^&kBF;;_nJS!T-1!qy`!JUk^xsAHeS!D`@^w{{a|U*n9v0
rename from toolkit/mozapps/extensions/test/browser/addons/browser_installssl/install.rdf
rename to toolkit/mozapps/extensions/test/browser/addons/browser_installssl/manifest.json
--- a/toolkit/mozapps/extensions/test/browser/addons/browser_installssl/install.rdf
+++ b/toolkit/mozapps/extensions/test/browser/addons/browser_installssl/manifest.json
@@ -1,30 +1,12 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>sslinstall@tests.mozilla.org</em:id>
-    <em:version>1.0</em:version>
+{
+  "manifest_version": 2,
 
-    <em:targetApplication>
-      <Description>
-        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
-        <em:minVersion>0.3</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
+  "applications": {
+    "gecko": {
+      "id": "sslinstall-1@tests.mozilla.org"
+    }
+  },
 
-    <em:targetApplication>
-      <Description>
-        <em:id>toolkit@mozilla.org</em:id>
-        <em:minVersion>0</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-
-    <!-- Front End MetaData -->
-    <em:name>SSL Install Tests</em:name>
-
-  </Description>
-</RDF>
+  "name": "SSL Install Tests",
+  "version": "1.0"
+}
--- a/toolkit/mozapps/extensions/test/browser/browser.ini
+++ b/toolkit/mozapps/extensions/test/browser/browser.ini
@@ -73,17 +73,16 @@ skip-if = buildapp == 'mulet'
 [browser_dragdrop_incompat.js]
 [browser_experiments.js]
 [browser_file_xpi_no_process_switch.js]
 [browser_getmorethemes.js]
 [browser_globalwarnings.js]
 [browser_gmpProvider.js]
 skip-if = os == 'linux' && !debug # Bug 1398766
 [browser_inlinesettings_browser.js]
-[browser_install.js]
 [browser_installssl.js]
 [browser_legacy.js]
 [browser_legacy_pre57.js]
 [browser_legacy_themes.js]
 [browser_list.js]
 [browser_manualupdates.js]
 [browser_newaddon.js]
 [browser_pluginprefs.js]
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/browser_install.js
+++ /dev/null
@@ -1,247 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Tests tha installs and undoing installs show up correctly
-
-var gManagerWindow;
-var gCategoryUtilities;
-
-var gApp = document.getElementById("bundle_brand").getString("brandShortName");
-
-function test() {
-  requestLongerTimeout(2);
-  waitForExplicitFinish();
-
-  // Allow http update checks
-  Services.prefs.setBoolPref("extensions.checkUpdateSecurity", false);
-
-  open_manager(null, function(aWindow) {
-    gManagerWindow = aWindow;
-    gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-    run_next_test();
-  });
-}
-
-function end_test() {
-  close_manager(gManagerWindow, function() {
-    Services.prefs.clearUserPref("extensions.checkUpdateSecurity");
-
-    AddonManager.getAddonByID("install1@tests.mozilla.org", function(aAddon) {
-      aAddon.uninstall();
-      finish();
-    });
-  });
-}
-
-function get_node(parent, anonid) {
-  return parent.ownerDocument.getAnonymousElementByAttribute(parent, "anonid", anonid);
-}
-
-function installAddon(aCallback) {
-  AddonManager.getInstallForURL(TESTROOT + "addons/browser_install1_2.xpi",
-                                function(aInstall) {
-    aInstall.addListener({
-      onInstallEnded() {
-        executeSoon(aCallback);
-      }
-    });
-    aInstall.install();
-  }, "application/x-xpinstall");
-}
-
-function installUpgrade(aCallback) {
-  AddonManager.getAddonByID("install1@tests.mozilla.org", function(aAddon) {
-    aAddon.findUpdates({
-      onUpdateAvailable(aAddon, aInstall) {
-        is(get_list_item_count(), 1, "Should be only one item in the list");
-
-        aInstall.addListener({
-          onDownloadEnded() {
-            is(get_list_item_count(), 1, "Should be only one item in the list once the update has started");
-          },
-          onInstallEnded() {
-            executeSoon(aCallback);
-          }
-        });
-        aInstall.install();
-      }
-    }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
-  });
-}
-
-function cancelInstall(aCallback) {
-  AddonManager.getInstallForURL(TESTROOT + "addons/browser_install1_2.xpi",
-                                function(aInstall) {
-    aInstall.addListener({
-      onDownloadEnded(aInstall) {
-        executeSoon(function() {
-          aInstall.cancel();
-          aCallback();
-        });
-        return false;
-      }
-    });
-    aInstall.install();
-  }, "application/x-xpinstall");
-}
-
-function get_list_item_count() {
-  return get_test_items_in_list(gManagerWindow).length;
-}
-
-function check_undo_install() {
-  is(get_list_item_count(), 1, "Should be only one item in the list");
-
-  let item = get_addon_element(gManagerWindow, "install1@tests.mozilla.org");
-  ok(!!item, "Should see the pending install in the list");
-  // Force XBL to apply
-  item.clientTop;
-  is_element_visible(get_node(item, "pending"), "Pending message should be visible");
-  is(get_node(item, "pending").textContent, "Install Tests will be installed after you restart " + gApp + ".", "Pending message should be correct");
-
-  EventUtils.synthesizeMouseAtCenter(get_node(item, "undo-btn"), {}, gManagerWindow);
-
-  is(get_list_item_count(), 0, "Should be no items in the list");
-
-  item = get_addon_element(gManagerWindow, "install1@tests.mozilla.org");
-  ok(!item, "Should no longer see the pending install");
-}
-
-function check_undo_upgrade() {
-  is(get_list_item_count(), 1, "Should be only one item in the list");
-
-  let item = get_addon_element(gManagerWindow, "install1@tests.mozilla.org");
-  ok(!!item, "Should see the pending upgrade in the list");
-  // Force XBL to apply
-  item.clientTop;
-  is_element_visible(get_node(item, "pending"), "Pending message should be visible");
-  is(get_node(item, "pending").textContent, "Install Tests will be updated after you restart " + gApp + ".", "Pending message should be correct");
-
-  EventUtils.synthesizeMouseAtCenter(get_node(item, "undo-btn"), {}, gManagerWindow);
-
-  is(get_list_item_count(), 1, "Should be only one item in the list");
-
-  item = get_addon_element(gManagerWindow, "install1@tests.mozilla.org");
-  ok(!!item, "Should still see installed item in the list");
-  is_element_hidden(get_node(item, "pending"), "Pending message should be hidden");
-}
-
-// Install an add-on through the API with the manager open
-add_test(function() {
-  gCategoryUtilities.openType("extension", function() {
-    installAddon(function() {
-      check_undo_install();
-      run_next_test();
-    });
-  });
-});
-
-// Install an add-on with the manager closed then open it
-add_test(function() {
-  close_manager(gManagerWindow, function() {
-    installAddon(function() {
-      open_manager(null, function(aWindow) {
-        gManagerWindow = aWindow;
-        gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-        check_undo_install();
-        run_next_test();
-      });
-    });
-  });
-});
-
-// Cancel an install after download with the manager open
-add_test(function() {
-  cancelInstall(function() {
-    is(get_list_item_count(), 0, "Should be no items in the list");
-
-    run_next_test();
-  });
-});
-
-// Cancel an install after download with the manager closed
-add_test(function() {
-  close_manager(gManagerWindow, function() {
-    cancelInstall(function() {
-      open_manager(null, function(aWindow) {
-        gManagerWindow = aWindow;
-        gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-        is(get_list_item_count(), 0, "Should be no items in the list");
-
-        run_next_test();
-      });
-    });
-  });
-});
-
-// Install an existing add-on for the subsequent tests
-add_test(function() {
-  AddonManager.getInstallForURL(TESTROOT + "addons/browser_install1_1.xpi",
-                                function(aInstall) {
-    aInstall.addListener({
-      onInstallEnded: run_next_test
-    });
-    aInstall.install();
-  }, "application/x-xpinstall");
-});
-
-// Install an upgrade through the API with the manager open
-add_test(function() {
-  installAddon(function() {
-    check_undo_upgrade();
-    run_next_test();
-  });
-});
-
-// Install an upgrade through the API with the manager open
-add_test(function() {
-  installUpgrade(function() {
-    check_undo_upgrade();
-    run_next_test();
-  });
-});
-
-// Install an upgrade through the API with the manager closed
-add_test(function() {
-  close_manager(gManagerWindow, function() {
-    installAddon(function() {
-      open_manager(null, function(aWindow) {
-        gManagerWindow = aWindow;
-        gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-        check_undo_upgrade();
-        run_next_test();
-      });
-    });
-  });
-});
-
-// Cancel an upgrade after download with the manager open
-add_test(function() {
-  cancelInstall(function() {
-    is(get_list_item_count(), 1, "Should be no items in the list");
-    let item = get_addon_element(gManagerWindow, "install1@tests.mozilla.org");
-    ok(!!item, "Should still see installed item in the list");
-    is_element_hidden(get_node(item, "pending"), "Pending message should be hidden");
-
-    run_next_test();
-  });
-});
-
-// Cancel an upgrade after download with the manager closed
-add_test(function() {
-  close_manager(gManagerWindow, function() {
-    cancelInstall(function() {
-      open_manager(null, function(aWindow) {
-        gManagerWindow = aWindow;
-        gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-        is(get_list_item_count(), 1, "Should be no items in the list");
-        let item = get_addon_element(gManagerWindow, "install1@tests.mozilla.org");
-        ok(!!item, "Should still see installed item in the list");
-        is_element_hidden(get_node(item, "pending"), "Pending message should be hidden");
-
-        run_next_test();
-      });
-    });
-  });
-});
--- a/toolkit/mozapps/extensions/test/browser/browser_install.rdf
+++ b/toolkit/mozapps/extensions/test/browser/browser_install.rdf
@@ -1,26 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:em="http://www.mozilla.org/2004/em-rdf#">
 
-  <Description about="urn:mozilla:extension:install1@tests.mozilla.org">
+  <Description about="urn:mozilla:extension:install-1@tests.mozilla.org">
     <em:updates>
       <Seq>
         <li>
           <Description>
             <em:version>2.0</em:version>
             <em:targetApplication>
               <Description>
                 <em:id>toolkit@mozilla.org</em:id>
                 <em:minVersion>0</em:minVersion>
                 <em:maxVersion>*</em:maxVersion>
                 <em:updateLink>https://example.com/browser/toolkit/mozapps/extensions/test/browser/browser_install1_3.xpi</em:updateLink>
-                <em:updateHash>sha1:4f0f4391914e3e036beca50cbac33958e5269643</em:updateHash>
+                <em:updateHash>sha1:f9027a7d2b3d7527431285bb508f1119954f4d87</em:updateHash>
               </Description>
             </em:targetApplication>
           </Description>
         </li>
       </Seq>
     </em:updates>
   </Description>
 
index de3c90353e563869fa0db7e7467b967574a69fa2..b1a3706d16d05e48d77aaa598611d1960b78091e
GIT binary patch
literal 4277
zc${^YWl$7q7sr=IIu>c^4go=0x?#x$$rb5Zx@!SxkVZf{7o>YBC6)&1MjE6W5k+3_
zJM+$+*SYsRb3Xi^dFGtw%=v%$X{n*10|5X4HoykUP2FDVdm$x00N_dl0Q_~Up`a(j
zqXJTV>g4Qa=jdq8>*j7gYha_NYfQxwt|d#1N-USg%HzUhDvvI|4^Di`FU_7zj~)t3
zoyeny3)<<(i|G_|(9<VW02Ta*6;fH*^Ob2Qd^OibD>ESt)?*3nbE}6xPE2j`{BM4p
zV6sQ9yz+Rxk+lJ#lo4E4A7(Iyxeb!wp_+dMP*F6AkfO(-u1gt9X95*DVX~|ETJ&j|
zM10tIrB-`cKIGbV7=XCon-B_kIc!}5k0w7%M!kR!ePIT@7bBklAc<O_bmiF<Ksizd
zx^iLjd!;fikE)0xO{ceky&+Xm;fEOz@kHML>52?mUi7ovb@fk|nIb+u;#)L)J+Sp|
zG$Qnty#ySB*rdLtWzt8v$xtaX29>K%7H?5If~#W*-dK7v-}#8GgB~VBnc7e!A}RTC
zU{}8|20359H9nC;Lg<Ok3>bs48nJ8JI58j9(gLW^i=IrzO81D7-i~I|4pQviAK#8Y
zF1-uXpg{k05k`NnsY4+Hdk}ww39<=gd*uIJfXY2<dtK!Y7Xya6`{3y=Gowd@li~Xy
z4%_br@<kmC0WZb6?{eZSOgYQAG;T0QU2TTGDDB}IM(5>Z(-4op#=BxZ!e0JTLH8^c
z$61K%V9$D{gaa%W;~{nzuabE0yhbdc(as0mQ8e)KR$NvHGu!`l(!twpoUJlmryN$j
zPd2q^{|hhdu8Pg7-|XhAN_tMQ?yD9TF3H@!YT~4jT?2c2j~lVgObK{s|GSml@QR{M
z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Q7bCR%6}<E9?A{
zu|ZwAY*@maE?(?SEq0I78Rl1QS8h<RCa8gg#xBmOO&0mMf^x<o&EJ*W+;RW`fd3!U
z@e02f^;>=XowWZ%x1Nq}i8^Fqq5y@13%XyxH?hndzQcS`B^+fj?{elW*~ZFL&UWH!
zpZQ0h`bOS}8}u3Y61Sy6(I>SG2ai(a6y9(}4P@~5$}iv4?T>v=pqTcUtWY}Xc~Si#
zRNpo5XVo0$o68w<<`;A=d=%0{oe2vLY8->qQ~$!b*T$?FA(Age#e;J0SNE+<sE<(5
z9Mr^3Ca5}xX08Db3H7yrcsKC>9o7FAAwa;tfct+d0RG*ce}^vk53~N+{7=LD-TV~%
k&-VGV!k@eNyTT&HKW;`}i-7R22cX{v@O#Dz%D>cq08GfyjsO4v
--- a/toolkit/mozapps/extensions/test/xpinstall/browser.ini
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser.ini
@@ -1,34 +1,31 @@
 [DEFAULT]
 support-files =
   amosigned.xpi
   authRedirect.sjs
   bug540558.html
   bug638292.html
   bug645699.html
-  concurrent_installs.html
   cookieRedirect.sjs
   corrupt.xpi
   empty.xpi
   enabled.html
   hashRedirect.sjs
   head.js
   incompatible.xpi
   installchrome.html
   installtrigger.html
   installtrigger_frame.html
   navigate.html
   redirect.sjs
   restartless.xpi
   restartless-unsigned.xpi
   signed-no-cn.xpi
   signed-no-o.xpi
-  signed-tampered.xpi
-  signed-untrusted.xpi
   signed.xpi
   slowinstall.sjs
   startsoftwareupdate.html
   theme.xpi
   triggerredirect.html
   unsigned.xpi
 
 [browser_amosigned_trigger.js]
@@ -43,17 +40,16 @@ support-files =
 [browser_badhash.js]
 [browser_badhashtype.js]
 [browser_bug540558.js]
 [browser_bug611242.js]
 [browser_bug638292.js]
 [browser_bug645699.js]
 [browser_bug672485.js]
 skip-if = true # disabled due to a leak. See bug 682410.
-[browser_concurrent_installs.js]
 [browser_cookies.js]
 [browser_cookies2.js]
 [browser_cookies3.js]
 [browser_cookies4.js]
 skip-if = true # Bug 1084646
 [browser_corrupt.js]
 [browser_datauri.js]
 [browser_empty.js]
@@ -68,40 +64,19 @@ skip-if = true # Bug 1084646
 [browser_httphash4.js]
 [browser_httphash5.js]
 [browser_httphash6.js]
 [browser_installchrome.js]
 [browser_localfile.js]
 [browser_localfile2.js]
 [browser_localfile3.js]
 [browser_localfile4.js]
-[browser_navigateaway.js]
-[browser_navigateaway2.js]
-[browser_navigateaway3.js]
-skip-if = (os == "mac" || os == "win") # Bug 1198261
-[browser_navigateaway4.js]
 [browser_offline.js]
 [browser_relative.js]
-[browser_signed_tampered.js]
-skip-if = require_signing
-[browser_signed_trigger.js]
-skip-if = require_signing
-[browser_signed_untrusted.js]
-skip-if = require_signing
-[browser_signed_url.js]
-skip-if = require_signing
 [browser_softwareupdate.js]
-[browser_switchtab.js]
 [browser_trigger_redirect.js]
 [browser_unsigned_trigger.js]
 skip-if = require_signing
 [browser_unsigned_trigger_iframe.js]
 skip-if = require_signing
 [browser_unsigned_trigger_xorigin.js]
 [browser_unsigned_url.js]
 skip-if = require_signing
-[browser_whitelist.js]
-[browser_whitelist2.js]
-[browser_whitelist3.js]
-[browser_whitelist4.js]
-[browser_whitelist5.js]
-[browser_whitelist6.js]
-[browser_whitelist7.js]
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
@@ -17,22 +17,18 @@ function test() {
       IconURL: TESTROOT + "icon.png",
       toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 const finish_test = async function(count) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
@@ -18,22 +18,18 @@ function test() {
       IconURL: TESTROOT + "icon.png",
       toString() { return this.URL; }
     }
   })));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger_frame.html?" + inner_url);
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 const finish_test = async function(count) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_url.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_url.js
@@ -7,22 +7,18 @@ function test() {
   Harness.setup();
 
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank");
   BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
     gBrowser.loadURI(TESTROOT + "amosigned.xpi");
   });
 }
 
-function confirm_install(window) {
-  let items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have had the filename for the item name");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, "", "Should have listed no icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 function finish_test(count) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699.js
@@ -16,17 +16,17 @@ function test() {
 }
 
 function allow_blocked(installInfo) {
   is(installInfo.browser, gBrowser.selectedBrowser, "Install should have been triggered by the right browser");
   is(installInfo.originatingURI.spec, gBrowser.currentURI.spec, "Install should have been triggered by the right uri");
   return false;
 }
 
-function confirm_install(window) {
+function confirm_install(panel) {
   ok(false, "Should not see the install dialog");
   return false;
 }
 
 function finish_test(count) {
   is(count, 0, "0 Add-ons should have been successfully installed");
   Services.perms.remove(makeURI("http://addons.mozilla.org"), "install");
 
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js
@@ -20,17 +20,17 @@ function test() {
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": TESTROOT + "amosigned.xpi"
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
-function confirm_install(window) {
+function confirm_install(panel) {
   ok(false, "Should not see the install dialog");
   return false;
 }
 
 function cancelled_install() {
   ok(true, "Install should b cancelled");
 }
 
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
+++ /dev/null
@@ -1,123 +0,0 @@
-// Test that having two frames that request installs at the same time doesn't
-// cause callback ID conflicts (discussed in bug 926712)
-
-var gConcurrentTabs = [];
-var gQueuedForInstall = [];
-var gResults = [];
-
-function frame_script() {
-  /* globals addMessageListener, sendAsyncMessage*/
-  addMessageListener("Test:StartInstall", () => {
-    content.document.getElementById("installnow").click();
-  });
-
-  addEventListener("load", () => {
-    sendAsyncMessage("Test:Loaded");
-
-    content.addEventListener("InstallComplete", (e) => {
-      sendAsyncMessage("Test:InstallComplete", e.detail);
-    }, true);
-  }, true);
-}
-
-var gAddonAndWindowListener = {
-  onOpenWindow(win) {
-    var window = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
-    info("Window opened");
-
-    waitForFocus(function() {
-      info("Focused!");
-      // Initially the accept button is disabled on a countdown timer
-      let button = window.document.documentElement.getButton("accept");
-      button.disabled = false;
-      if (gQueuedForInstall.length > 0) {
-        // Start downloading the next add-on while we accept this dialog:
-        installNext();
-      }
-      window.document.documentElement.acceptDialog();
-    }, window);
-  },
-  onCloseWindow(win) { },
-  onInstallEnded(install) {
-    install.cancel();
-  },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener])
-};
-
-function installNext() {
-  let tab = gQueuedForInstall.shift();
-  tab.linkedBrowser.messageManager.sendAsyncMessage("Test:StartInstall");
-}
-
-function createTab(url) {
-  let tab = BrowserTestUtils.addTab(gBrowser, url);
-  tab.linkedBrowser.messageManager.loadFrameScript("data:,(" + frame_script.toString() + ")();", true);
-
-  tab.linkedBrowser.messageManager.addMessageListener("Test:InstallComplete", ({data}) => {
-    gResults.push(data);
-    if (gResults.length == 2) {
-      executeSoon(endThisTest);
-    }
-  });
-
-  return tab;
-}
-
-function test() {
-  waitForExplicitFinish();
-
-  Services.prefs.setBoolPref(PREF_LOGGING_ENABLED, true);
-  Services.prefs.setBoolPref(PREF_INSTALL_REQUIRESECUREORIGIN, false);
-  Services.wm.addListener(gAddonAndWindowListener);
-  AddonManager.addInstallListener(gAddonAndWindowListener);
-  registerCleanupFunction(function() {
-    Services.wm.removeListener(gAddonAndWindowListener);
-    AddonManager.removeInstallListener(gAddonAndWindowListener);
-    Services.prefs.clearUserPref(PREF_LOGGING_ENABLED);
-    Services.prefs.clearUserPref(PREF_INSTALL_REQUIRESECUREORIGIN);
-
-    Services.perms.remove(makeURI("http://example.com"), "install");
-    Services.perms.remove(makeURI("http://example.org"), "install");
-
-    while (gConcurrentTabs.length) {
-      gBrowser.removeTab(gConcurrentTabs.shift());
-    }
-  });
-
-  let pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-  pm.add(makeURI("http://example.org/"), "install", pm.ALLOW_ACTION);
-
-  gConcurrentTabs.push(createTab(TESTROOT + "concurrent_installs.html"));
-  gConcurrentTabs.push(createTab(TESTROOT2 + "concurrent_installs.html"));
-
-  let promises = gConcurrentTabs.map((t) => {
-    return new Promise(resolve => {
-      t.linkedBrowser.messageManager.addMessageListener("Test:Loaded", resolve);
-    });
-  });
-
-  Promise.all(promises).then(() => {
-    gQueuedForInstall = [...gConcurrentTabs];
-    installNext();
-  });
-}
-
-function endThisTest() {
-  is(gResults.length, 2, "Should have two urls");
-  isnot(gResults[0].loc, gResults[1].loc, "Should not have results from the same page.");
-  isnot(gResults[0].xpi, gResults[1].xpi, "Should not have the same XPIs.");
-  for (let i = 0; i < 2; i++) {
-    let {loc, xpi} = gResults[i];
-    if (loc.includes("example.org")) {
-      ok(xpi.includes("example.org"), "Should get .org XPI for .org loc");
-    } else if (loc.includes("example.com")) {
-      ok(xpi.includes("example.com"), "Should get .com XPI for .com loc");
-    } else {
-      ok(false, "Should never get anything that isn't from example.org or example.com");
-    }
-  }
-
-  finish();
-}
-
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js
@@ -41,12 +41,12 @@ function install_disabled(installInfo) {
   ok(true, "Saw installation disabled");
 }
 
 function allow_blocked(installInfo) {
   ok(false, "Should never see the blocked install notification");
   return false;
 }
 
-function confirm_install(window) {
+function confirm_install(panel) {
   ok(false, "Should never see an install confirmation dialog");
   return false;
 }
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
@@ -7,17 +7,17 @@ function test() {
   Harness.setup();
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
-      Hash: "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
+      Hash: "sha1:ee95834ad862245a9ef99ccecc2a857cadc16404",
       toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
@@ -7,17 +7,17 @@ function test() {
   Harness.setup();
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
-      Hash: "sha1:36FFB0ACFD9C6E9682473AAEBAAB394D38B473C9",
+      Hash: "sha1:EE95834AD862245A9EF99CCECC2A857CADC16404",
       toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
@@ -7,17 +7,17 @@ function test() {
   Harness.installsCompletedCallback = finish_test;
   Harness.setup();
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
   Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
 
   var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
-  url += "?sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9|" + TESTROOT + "amosigned.xpi";
+  url += "?sha1:ee95834ad862245a9ef99ccecc2a857cadc16404|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
       toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
@@ -11,17 +11,17 @@ function test() {
   Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
 
   var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
-      Hash: "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
+      Hash: "sha1:ee95834ad862245a9ef99ccecc2a857cadc16404",
       toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
@@ -6,17 +6,17 @@ function test() {
   Harness.installsCompletedCallback = finish_test;
   Harness.setup();
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
   Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
 
   var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
-  url += "?sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9|";
+  url += "?sha1:ee95834ad862245a9ef99ccecc2a857cadc16404|";
   url += "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
       toString() { return this.URL; }
     }
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
@@ -50,17 +50,17 @@ function download_failed(install) {
 function finish_failed_download() {
   // Setup to track the successful re-download
   Harness.installEndedCallback = install_ended;
   Harness.installsCompletedCallback = finish_test;
   Harness.setup();
 
   // Give it the right hash this time
   setup_redirect({
-    "X-Target-Digest": "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
+    "X-Target-Digest": "sha1:ee95834ad862245a9ef99ccecc2a857cadc16404",
     "Location": "http://example.com/browser/" + RELATIVE_DIR + "amosigned.xpi"
   });
 
   // The harness expects onNewInstall events for all installs that are about to start
   Harness.onNewInstall(gInstall);
 
   // Restart the install as a regular webpage install so the harness tracks it
   AddonManager.installAddonFromWebpage("application/x-xpinstall",
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests that navigating away from the initiating page during the install
-// doesn't break the install.
-// This verifies bug 473060
-function test() {
-  Harness.downloadProgressCallback = download_progress;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Unsigned XPI": TESTROOT + "amosigned.xpi"
-  }));
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function download_progress(addon, value, maxValue) {
-  gBrowser.loadURI(TESTROOT + "enabled.html");
-}
-
-function install_ended(install, addon) {
-  install.cancel();
-}
-
-function finish_test(count) {
-  is(count, 1, "1 Add-on should have been successfully installed");
-
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests that closing the initiating page during the install cancels the install
-// to avoid spoofing the user.
-function test() {
-  Harness.downloadProgressCallback = download_progress;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Unsigned XPI": TESTROOT + "amosigned.xpi"
-  }));
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function download_progress(addon, value, maxValue) {
-  gBrowser.removeCurrentTab();
-}
-
-function install_ended(install, addon) {
-  ok(false, "Should not have seen installs complete");
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been successfully installed");
-
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  Harness.finish();
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway3.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests that navigating to a new origin cancels ongoing installs.
-
-// Block the modal install UI from showing.
-Services.prefs.setBoolPref(PREF_CUSTOM_CONFIRMATION_UI, true);
-
-function test() {
-  Harness.downloadProgressCallback = download_progress;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Unsigned XPI": TESTROOT + "amosigned.xpi"
-  }));
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function download_progress(addon, value, maxValue) {
-  gBrowser.loadURI(TESTROOT2 + "enabled.html");
-}
-
-function install_ended(install, addon) {
-  ok(false, "Should not have seen installs complete");
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been successfully installed");
-
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway4.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests that navigating to a new origin cancels ongoing installs and closes
-// the install UI.
-var sawUnload = null;
-
-function test() {
-  Harness.installConfirmCallback = confirm_install;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Unsigned XPI": TESTROOT + "amosigned.xpi"
-  }));
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function confirm_install(window) {
-  sawUnload = BrowserTestUtils.waitForEvent(window, "unload");
-
-  gBrowser.loadURI(TESTROOT2 + "enabled.html");
-
-  return Harness.leaveOpen;
-}
-
-function install_ended(install, addon) {
-  ok(false, "Should not have seen installs complete");
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been successfully installed");
-
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  sawUnload.then(() => {
-    ok(true, "The install UI should have closed itself.");
-    gBrowser.removeCurrentTab();
-    Harness.finish();
-  });
-}
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
@@ -16,22 +16,18 @@ function test() {
       IconURL: "icon.png",
       toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 const finish_test = async function(count) {
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_tampered.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing a signed add-on that has been tampered with after signing.
-// In "no signature required" mode, a tampered add-on is equivalent to an
-// unsigned add-on.
-function test() {
-  Harness.installConfirmCallback = confirm_install;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.finalContentEvent = "InstallComplete";
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Tampered Signed XPI": TESTROOT + "signed-tampered.xpi"
-  }));
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "Signed XPI Test - Tampered", "Should have seen the name");
-  is(items[0].url, TESTROOT + "signed-tampered.xpi", "Should have listed the correct url for the item");
-  return true;
-}
-
-function install_ended(install, addon) {
-  install.cancel();
-}
-
-const finish_test = async function(count) {
-  is(count, 1, "1 Add-on should have been successfully installed");
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  const results = await ContentTask.spawn(gBrowser.selectedBrowser, null, () => {
-    return {
-      return: content.document.getElementById("return").textContent,
-      status: content.document.getElementById("status").textContent,
-    };
-  });
-
-  is(results.return, "true", "installTrigger should have claimed success");
-  is(results.status, "0", "Callback should have seen a success");
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-};
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_trigger.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_trigger.js
@@ -12,21 +12,18 @@ function test() {
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Signed XPI": TESTROOT + "amosigned.xpi"
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name from the trigger list");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 function finish_test(count) {
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_untrusted.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an add-on signed by an untrusted certificate through an
-// InstallTrigger call in web content.
-function test() {
-  Harness.installConfirmCallback = confirm_install;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Untrusted Signed XPI": TESTROOT + "signed-untrusted.xpi"
-  }));
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "Signed XPI Test", "Should have had the filename for the item name");
-  is(items[0].url, TESTROOT + "signed-untrusted.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, "", "Should have listed no icon for the item");
-  return true;
-}
-
-function install_ended(install, addon) {
-  install.cancel();
-}
-
-function finish_test(count) {
-  is(count, 1, "1 Add-on should have been successfully installed");
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
-// ----------------------------------------------------------------------------
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_url.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_url.js
@@ -7,21 +7,18 @@ function test() {
   Harness.setup();
 
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank");
   BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
     gBrowser.loadURI(TESTROOT + "amosigned.xpi");
   });
 }
 
-function confirm_install(window) {
-  let items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have had the name");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 function finish_test(count) {
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an unsigned add-on through an InstallTrigger call in web
-// content.
-var expectedTab = null;
-
-function test() {
-  Harness.installConfirmCallback = confirm_install;
-  Harness.installEndedCallback = install_ended;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Unsigned XPI": {
-      URL: TESTROOT + "amosigned.xpi",
-      IconURL: TESTROOT + "icon.png",
-      toString() { return this.URL; }
-    }
-  }));
-  expectedTab = BrowserTestUtils.addTab(gBrowser);
-  expectedTab.linkedBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
-
-  is(gBrowser.selectedTab, expectedTab, "Should have switched to the installing tab.");
-  return true;
-}
-
-function install_ended(install, addon) {
-  install.cancel();
-}
-
-function finish_test(count) {
-  is(count, 1, "1 Add-on should have been successfully installed");
-
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  gBrowser.removeTab(expectedTab);
-  Harness.finish();
-}
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js
@@ -9,22 +9,18 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "triggerredirect.html");
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 function finish_test(count) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js
@@ -17,22 +17,18 @@ function test() {
       IconURL: TESTROOT + "icon.png",
       toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name");
-  is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 const finish_test = async function(count) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js
@@ -18,22 +18,18 @@ function test() {
       IconURL: TESTROOT + "icon.png",
       toString() { return this.URL; }
     }
   })));
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.loadURI(TESTROOT + "installtrigger_frame.html?" + inner_url);
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name");
-  is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 const finish_test = async function(count) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_url.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_url.js
@@ -7,22 +7,18 @@ function test() {
   Harness.setup();
 
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank");
   BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
     gBrowser.loadURI(TESTROOT + "unsigned.xpi");
   });
 }
 
-function confirm_install(window) {
-  let items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have had the filename for the item name");
-  is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
-  is(items[0].icon, "", "Should have listed no icon for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 function finish_test(count) {
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js
@@ -17,21 +17,18 @@ function test() {
 }
 
 function allow_blocked(installInfo) {
   is(installInfo.browser, gBrowser.selectedBrowser, "Install should have been triggered by the right browser");
   is(installInfo.originatingURI.spec, gBrowser.currentURI.spec, "Install should have been triggered by the right uri");
   return true;
 }
 
-function confirm_install(window) {
-  var items = window.document.getElementById("itemList").childNodes;
-  is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
-  is(items[0].name, "XPI Test", "Should have seen the name from the trigger list");
-  is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
+function confirm_install(panel) {
+  is(panel.getAttribute("name"), "XPI Test", "Should have seen the name");
   return true;
 }
 
 function install_ended(install, addon) {
   install.cancel();
 }
 
 const finish_test = async function(count) {
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist2.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an unsigned add-on through an InstallTrigger call in web
-// content. This should be blocked by the whitelist check because the source
-// is not whitelisted, even though the target is.
-function test() {
-  Harness.installBlockedCallback = allow_blocked;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.org/"), "install", pm.ALLOW_ACTION);
-
-  var triggers = encodeURIComponent(JSON.stringify({
-    "Unsigned XPI": TESTROOT2 + "amosigned.xpi"
-  }));
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
-}
-
-function allow_blocked(installInfo) {
-  is(installInfo.browser, gBrowser.selectedBrowser, "Install should have been triggered by the right browser");
-  is(installInfo.originatingURI.spec, gBrowser.currentURI.spec, "Install should have been triggered by the right uri");
-  return false;
-}
-
-function finish_test() {
-  Services.perms.remove(makeURI("http://example.org"), "install");
-
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist3.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an unsigned add-on through a navigation. Should not be
-// blocked since the referer is whitelisted.
-var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "amosigned.xpi");
-
-function test() {
-  Harness.installConfirmCallback = confirm_install;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.org/"), "install", pm.ALLOW_ACTION);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(url);
-}
-
-function confirm_install(window) {
-  return false;
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been installed");
-  Services.perms.remove(makeURI("http://example.org"), "install");
-
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist4.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an unsigned add-on through a navigation. Should be
-// blocked since the referer is not whitelisted even though the target is.
-var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "amosigned.xpi");
-
-function test() {
-  Harness.installBlockedCallback = allow_blocked;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  var pm = Services.perms;
-  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(url);
-}
-
-function allow_blocked(installInfo) {
-  is(installInfo.browser, gBrowser.selectedBrowser, "Install should have been triggered by the right browser");
-  is(installInfo.originatingURI.spec, url, "Install should have been triggered by the right uri");
-  return false;
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been installed");
-  Services.perms.remove(makeURI("http://example.com"), "install");
-
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist5.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an unsigned add-on through a startSoftwareUpdate call in web
-// content. This should be blocked by the whitelist check.
-// This verifies bug 252830
-function test() {
-  Harness.installBlockedCallback = allow_blocked;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "startsoftwareupdate.html? " + encodeURIComponent(TESTROOT + "amosigned.xpi"));
-}
-
-function allow_blocked(installInfo) {
-  is(installInfo.browser, gBrowser.selectedBrowser, "Install should have been triggered by the right browser");
-  is(installInfo.originatingURI.spec, gBrowser.currentURI.spec, "Install should have been triggered by the right uri");
-  return false;
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been installed");
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
-// ----------------------------------------------------------------------------
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist6.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an unsigned add-on through an installChrome call in web
-// content. This should be blocked by the whitelist check.
-// This verifies bug 252830
-function test() {
-  Harness.installBlockedCallback = allow_blocked;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.loadURI(TESTROOT + "installchrome.html? " + encodeURIComponent(TESTROOT + "amosigned.xpi"));
-}
-
-function allow_blocked(installInfo) {
-  is(installInfo.browser, gBrowser.selectedBrowser, "Install should have been triggered by the right browser");
-  is(installInfo.originatingURI.spec, gBrowser.currentURI.spec, "Install should have been triggered by the right uri");
-  return false;
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been installed");
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
-// ----------------------------------------------------------------------------
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist7.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// ----------------------------------------------------------------------------
-// Tests installing an unsigned add-on through a direct install request from
-// web content. This should be blocked by the whitelist check because we disable
-// direct request whitelisting, even though the target URI is whitelisted.
-function test() {
-  Harness.installBlockedCallback = allow_blocked;
-  Harness.installsCompletedCallback = finish_test;
-  Harness.setup();
-
-  // Disable direct request whitelisting, installing should be blocked.
-  Services.prefs.setBoolPref("xpinstall.whitelist.directRequest", false);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank");
-  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
-    gBrowser.loadURI(TESTROOT + "amosigned.xpi");
-  });
-}
-
-function allow_blocked(installInfo) {
-  ok(true, "Seen blocked");
-  return false;
-}
-
-function finish_test(count) {
-  is(count, 0, "No add-ons should have been installed");
-
-  Services.perms.remove(makeURI("http://example.org"), "install");
-  Services.prefs.clearUserPref("xpinstall.whitelist.directRequest");
-
-  gBrowser.removeCurrentTab();
-  Harness.finish();
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html>
-
-<head>
-  <meta charset="utf-8">
-<title>Concurrent InstallTrigger tests</title>
-<script type="text/javascript">
-/* globals InstallTrigger */
-/* exported startInstall */
-function installCallback(url, status) {
-  document.getElementById("status").textContent = status;
-
-  dump("Sending InstallComplete\n");
-  var event = new CustomEvent("InstallComplete", {detail: {loc: location.href, xpi: url}});
-  window.dispatchEvent(event);
-}
-
-function startInstall() {
-  var root = location.href.replace("concurrent_installs.html", "");
-  var triggers = {
-    "Unsigned XPI": root + "amosigned.xpi"
-  };
-  try {
-    document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback);
-  } catch (e) {
-    document.getElementById("return").textContent = "exception";
-    throw e;
-  }
-}
-</script>
-</head>
-<body>
-<p>InstallTrigger tests</p>
-<button id="installnow" onclick="startInstall()">Click to install</button>
-<p id="return"></p>
-<p id="status"></p>
-</body>
-</html>
--- a/toolkit/mozapps/extensions/test/xpinstall/head.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/head.js
@@ -114,32 +114,36 @@ var Harness = {
       Services.obs.addObserver(this, "addon-install-blocked");
       Services.obs.addObserver(this, "addon-install-failed");
       Services.obs.addObserver(this, "addon-install-complete");
 
       AddonManager.addInstallListener(this);
 
       Services.wm.addListener(this);
 
+      window.addEventListener("popupshown", this);
+
       var self = this;
       registerCleanupFunction(function() {
         Services.prefs.clearUserPref(PREF_LOGGING_ENABLED);
         Services.prefs.clearUserPref(PREF_INSTALL_REQUIRESECUREORIGIN);
         Services.obs.removeObserver(self, "addon-install-started");
         Services.obs.removeObserver(self, "addon-install-disabled");
         // Services.obs.removeObserver(self, "addon-install-cancelled");
         Services.obs.removeObserver(self, "addon-install-origin-blocked");
         Services.obs.removeObserver(self, "addon-install-blocked");
         Services.obs.removeObserver(self, "addon-install-failed");
         Services.obs.removeObserver(self, "addon-install-complete");
 
         AddonManager.removeInstallListener(self);
 
         Services.wm.removeListener(self);
 
+        window.removeEventListener("popupshown", self);
+
         AddonManager.getAllInstalls(function(aInstalls) {
           is(aInstalls.length, 0, "Should be no active installs at the end of the test");
           aInstalls.forEach(function(aInstall) {
             info("Install for " + aInstall.sourceURI + " is in state " + aInstall.state);
             aInstall.cancel();
           });
         });
       });
@@ -234,16 +238,50 @@ var Harness = {
                 break;
           default:
                 ok(false, "prompt type " + promptType + " not handled in test.");
                 break;
       }
     }
   },
 
+  popupReady(panel) {
+    if (this.installBlockedCallback)
+      ok(false, "Should have been blocked by the whitelist");
+    this.pendingCount++;
+
+    // If there is a confirm callback then its return status determines whether
+    // to install the items or not. If not the test is over.
+    let result = true;
+    if (this.installConfirmCallback) {
+      result = this.installConfirmCallback(panel);
+      if (result === this.leaveOpen)
+        return;
+    }
+
+    if (!result) {
+      panel.secondaryButton.click();
+    } else {
+      panel.button.click();
+    }
+  },
+
+  handleEvent(event) {
+    if (event.type === "popupshown") {
+      if (event.target.firstChild) {
+        let popupId = event.target.getAttribute("popupid");
+        if (popupId === "addon-webext-permissions") {
+          this.popupReady(event.target.firstChild);
+        } else if (popupId === "addon-installed" || popupId === "addon-install-failed") {
+          event.target.firstChild.button.click();
+        }
+      }
+    }
+  },
+
   // Install blocked handling
 
   installDisabled(installInfo) {
     ok(!!this.installDisabledCallback, "Installation shouldn't have been disabled");
     if (this.installDisabledCallback)
       this.installDisabledCallback(installInfo);
     this.expectingCancelled = true;
     this.expectingCancelled = false;
@@ -350,19 +388,19 @@ var Harness = {
   },
 
   onInstallStarted(install) {
     if (this.installStartedCallback)
       this.installStartedCallback(install);
   },
 
   onInstallEnded(install, addon) {
+    this.installCount++;
     if (this.installEndedCallback)
       this.installEndedCallback(install, addon);
-    this.installCount++;
     this.checkTestEnded();
   },
 
   onInstallFailed(install) {
     if (this.installFailedCallback)
       this.installFailedCallback(install);
     this.checkTestEnded();
   },
deleted file mode 100644
index 8c951881e5fbe10504eee8280dd9a3d995b5c881..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 09789d1897ccd3c6e0d30c94dc658f5cda732771..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
index 51b00475a9641ea9d608874a3ab7679da3a4374b..cf8bc616b743e0c4d969bfe15e2c3afbd5152788
GIT binary patch
literal 286
zc$^FHW@Zs#W?<l8$f+;%Dd~7~w~m2<VKET%0&#9)US?Wqafx15aekg_pCR8N10L7!
zbCf>CC|#M@IkmU3k=J!?r;d>NDrTnz_hgrcyn67^-oE~4_L|lwGv8@^{dUMx!&oNg
z{>*J3m%2#Rglc%rUTgB;!-?z|hTd5ZPC7Lf-r377yZT$F_fKcTs_Dxax^1NA)|>xs
zdHbfy?q>I`3#PmFGVHzGJo7AnfHxzPJu@z+sxUx+Lc@|q26TsWF(`l~85txP8p64z
YJMX*9h)xH1v$8?dFfzmg>6Ks|075@y4FCWD