Bug 1473933: Remove xpinstallConfirm dialog. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Tue, 25 Sep 2018 15:33:52 -0700
changeset 438231 d9a9e40ab5ce
parent 438230 b4492a216eb0
child 438232 21b679ea5cb6
push id108258
push usermaglione.k@gmail.com
push dateWed, 26 Sep 2018 02:30:24 +0000
treeherdermozilla-inbound@21b679ea5cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1473933
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1473933: Remove xpinstallConfirm dialog. r=aswan Differential Revision: https://phabricator.services.mozilla.com/D6854
caps/tests/mochitest/mochitest.ini
caps/tests/mochitest/test_bug292789.html
toolkit/locales/en-US/chrome/mozapps/extensions/xpinstallConfirm.dtd
toolkit/locales/en-US/chrome/mozapps/extensions/xpinstallConfirm.properties
toolkit/locales/jar.mn
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/content/xpinstallConfirm.css
toolkit/mozapps/extensions/content/xpinstallConfirm.js
toolkit/mozapps/extensions/content/xpinstallConfirm.xul
toolkit/mozapps/extensions/content/xpinstallItem.xml
toolkit/mozapps/extensions/jar.mn
toolkit/mozapps/extensions/test/browser/head.js
toolkit/mozapps/extensions/test/xpinstall/head.js
toolkit/themes/osx/mozapps/extensions/xpinstallConfirm.css
toolkit/themes/osx/mozapps/jar.mn
toolkit/themes/shared/non-mac.jar.inc.mn
toolkit/themes/windows/mozapps/extensions/xpinstallConfirm.css
--- a/caps/tests/mochitest/mochitest.ini
+++ b/caps/tests/mochitest/mochitest.ini
@@ -4,12 +4,13 @@ support-files =
   file_bug1367586-redirect.sjs
   file_bug1367586-target.html
   file_data.txt
   file_disableScript.html
   !/js/xpconnect/tests/mochitest/file_empty.html
 
 [test_bug246699.html]
 [test_bug292789.html]
+skip-if = os == 'android'
 [test_bug423375.html]
 [test_bug470804.html]
 [test_bug1367586.html]
 [test_disallowInheritPrincipal.html]
--- a/caps/tests/mochitest/test_bug292789.html
+++ b/caps/tests/mochitest/test_bug292789.html
@@ -8,50 +8,54 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=292789">Mozilla Bug 292789</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <script src="chrome://global/content/treeUtils.js"></script>
-  <script type="application/javascript" src="chrome://mozapps/content/xpinstall/xpinstallConfirm.js"></script>
+  <script type="application/javascript" src="chrome://mozapps/content/extensions/eula.js"></script>
   <script id="resjs" type="application/javascript"></script>
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 292789
  **
  ** Selectively allow access to whitelisted chrome packages
  ** even for ALLOW_CHROME mechanisms (<script>, <img> etc)
  **/
 
 /* import-globals-from ../../../toolkit/content/treeUtils.js */
 
 SimpleTest.waitForExplicitFinish();
 
+let ChromeUtils = {
+  import() {},
+};
+
 /** <script src=""> test **/
 function testScriptSrc(aCallback) {
     is(typeof gTreeUtils.sort, "function",
        "content can still load <script> from chrome://global");
-    is(typeof XPInstallConfirm, "undefined",
+    is(typeof Startup, "undefined",
        "content should not be able to load <script> from chrome://mozapps");
 
     /** make sure the last one didn't pass because someone
      ** moved the resource
      **/
     var resjs = document.getElementById("resjs");
     resjs.onload = scriptOnload;
-    resjs.src = "resource://gre/chrome/toolkit/content/mozapps/xpinstall/xpinstallConfirm.js";
+    resjs.src = "resource://gre/chrome/toolkit/content/mozapps/extensions/eula.js";
     document.getElementById("content").appendChild(resjs);
 
     function scriptOnload() {
-      is(typeof XPInstallConfirm, "object",
-         "xpinstallConfirm.js has not moved unexpectedly");
+      is(typeof Startup, "function",
+         "extensions.js has not moved unexpectedly");
 
       // trigger the callback
       if (aCallback)
         aCallback();
     }
 }
 
 /** <img src=""> tests **/
deleted file mode 100644
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/xpinstallConfirm.dtd
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- extracted from institems.xul -->
-
-<!ENTITY dialog.title            "Software Installation">
-<!ENTITY dialog.style            "width: 45em">
-<!ENTITY warningPrimary.label    "Install add-ons only from authors whom you trust.">
-<!ENTITY warningSecondary.label  "Malicious software can damage your computer or violate your privacy.">
-
-<!ENTITY from.label "from:">
-
deleted file mode 100644
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/xpinstallConfirm.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-itemWarnIntroMultiple=You have asked to install the following %S items:
-itemWarnIntroSingle=You have asked to install the following item:
-installButtonDisabledLabel=Install (%S)
-installButtonLabel=Install Now
--- a/toolkit/locales/jar.mn
+++ b/toolkit/locales/jar.mn
@@ -97,18 +97,16 @@
   locale/@AB_CD@/mozapps/profile/createProfileWizard.dtd          (%chrome/mozapps/profile/createProfileWizard.dtd)
   locale/@AB_CD@/mozapps/profile/profileSelection.properties      (%chrome/mozapps/profile/profileSelection.properties)
   locale/@AB_CD@/mozapps/profile/profileSelection.dtd             (%chrome/mozapps/profile/profileSelection.dtd)
 #ifndef MOZ_FENNEC
   locale/@AB_CD@/mozapps/update/updates.dtd                       (%chrome/mozapps/update/updates.dtd)
   locale/@AB_CD@/mozapps/update/updates.properties                (%chrome/mozapps/update/updates.properties)
 #endif
   locale/@AB_CD@/mozapps/update/history.dtd                       (%chrome/mozapps/update/history.dtd)
-  locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.dtd           (%chrome/mozapps/extensions/xpinstallConfirm.dtd)
-  locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.properties    (%chrome/mozapps/extensions/xpinstallConfirm.properties)
 % locale pluginproblem @AB_CD@ %locale/@AB_CD@/pluginproblem/
   locale/@AB_CD@/pluginproblem/pluginproblem.dtd                  (%chrome/pluginproblem/pluginproblem.dtd)
 % locale alerts @AB_CD@ %locale/@AB_CD@/alerts/
   locale/@AB_CD@/alerts/alert.dtd                                (%chrome/alerts/alert.dtd)
   locale/@AB_CD@/alerts/alert.properties                         (%chrome/alerts/alert.properties)
 % locale passwordmgr @AB_CD@ %locale/@AB_CD@/passwordmgr/
   locale/@AB_CD@/passwordmgr/passwordmgr.properties (%chrome/passwordmgr/passwordmgr.properties)
   locale/@AB_CD@/passwordmgr/passwordManager.dtd    (%chrome/passwordmgr/passwordManager.dtd)
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -28,16 +28,17 @@ const PREF_EM_LAST_PLATFORM_VERSION   = 
 const PREF_EM_AUTOUPDATE_DEFAULT      = "extensions.update.autoUpdateDefault";
 const PREF_EM_STRICT_COMPATIBILITY    = "extensions.strictCompatibility";
 const PREF_EM_CHECK_UPDATE_SECURITY   = "extensions.checkUpdateSecurity";
 const PREF_SYS_ADDON_UPDATE_ENABLED   = "extensions.systemAddon.update.enabled";
 
 const PREF_MIN_WEBEXT_PLATFORM_VERSION = "extensions.webExtensionsMinPlatformVersion";
 const PREF_WEBAPI_TESTING             = "extensions.webapi.testing";
 const PREF_WEBEXT_PERM_PROMPTS        = "extensions.webextPermissionPrompts";
+const PREF_XPINSTALL_DIALOG           = "extensions.xpinstall.confirm.dialog";
 
 const UPDATE_REQUEST_VERSION          = 2;
 
 const XMLURI_BLOCKLIST                = "http://www.mozilla.org/2006/addons-blocklist";
 
 const KEY_PROFILEDIR                  = "ProfD";
 const KEY_APPDIR                      = "XCurProcD";
 const FILE_BLOCKLIST                  = "blocklist.xml";
@@ -54,18 +55,16 @@ const VALID_TYPES_REGEXP = /^[\w\-]+$/;
 
 const WEBAPI_INSTALL_HOSTS = ["addons.mozilla.org", "testpilot.firefox.com"];
 const WEBAPI_TEST_INSTALL_HOSTS = [
   "addons.allizom.org", "addons-dev.allizom.org",
   "testpilot.stage.mozaws.net", "testpilot.dev.mozaws.net",
   "example.com",
 ];
 
-const URI_XPINSTALL_DIALOG = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/AsyncShutdown.jsm");
 
 XPCOMUtils.defineLazyGlobalGetters(this, ["DOMParser", "Element"]);
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AddonRepository: "resource://gre/modules/addons/AddonRepository.jsm",
@@ -2599,17 +2598,18 @@ var AddonManagerInternal = {
           }
 
           // Ugh modal dialogs...
           let reallyReject = reject;
           let cancelled = false;
           reject = () => {
             cancelled = true;
           };
-          Services.ww.openWindow(parentWindow, URI_XPINSTALL_DIALOG,
+          Services.ww.openWindow(parentWindow,
+                                 Services.prefs.getStringPref(PREF_XPINSTALL_DIALOG),
                                  null, "chrome,modal,centerscreen", args);
           if (cancelled) {
             reallyReject();
           }
         } catch (e) {
           logger.warn("Exception showing install confirmation dialog", e);
           // Cancel the install, as currently there is no way to make it fail
           // from here.
deleted file mode 100644
--- a/toolkit/mozapps/extensions/content/xpinstallConfirm.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-installitem {
-  -moz-binding: url("chrome://mozapps/content/xpinstall/xpinstallItem.xml#installitem");
-  display: -moz-box;
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/content/xpinstallConfirm.js
+++ /dev/null
@@ -1,180 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var XPInstallConfirm = {};
-
-XPInstallConfirm.init = function() {
-  ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
-  ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-  var _installCountdown;
-  var _installCountdownInterval;
-  var _focused;
-  var _timeout;
-
-  // Default to cancelling the install when the window unloads
-  XPInstallConfirm._installOK = false;
-
-  var bundle = document.getElementById("xpinstallConfirmStrings");
-
-  let args = window.arguments[0].wrappedJSObject;
-
-  // If all installs have already been cancelled in some way then just close
-  // the window
-  if (args.installs.every(i => i.state != AddonManager.STATE_DOWNLOADED)) {
-    window.close();
-    return;
-  }
-
-  var _installCountdownLength = 5;
-  try {
-    var delay_in_milliseconds = Services.prefs.getIntPref("security.dialog_enable_delay");
-    _installCountdownLength = Math.round(delay_in_milliseconds / 500);
-  } catch (ex) { }
-
-  var itemList = document.getElementById("itemList");
-
-  let installMap = new WeakMap();
-  let installListener = {
-    onDownloadCancelled(install) {
-      itemList.removeChild(installMap.get(install));
-      if (--numItemsToInstall == 0)
-        window.close();
-    },
-  };
-
-  var numItemsToInstall = args.installs.length;
-  for (let install of args.installs) {
-    var installItem = document.createElement("installitem");
-    itemList.appendChild(installItem);
-
-    installItem.name = install.addon.name;
-    installItem.url = install.sourceURI.spec;
-    var icon = install.iconURL;
-    if (icon)
-      installItem.icon = icon;
-    var type = install.type;
-    if (type)
-      installItem.type = type;
-
-    installMap.set(install.wrapped, installItem);
-    install.addListener(installListener);
-  }
-
-  var introString = bundle.getString("itemWarnIntroSingle");
-  if (numItemsToInstall > 4)
-    introString = bundle.getFormattedString("itemWarnIntroMultiple", [numItemsToInstall]);
-  var textNode = document.createTextNode(introString);
-  var introNode = document.getElementById("itemWarningIntro");
-  while (introNode.hasChildNodes())
-    introNode.firstChild.remove();
-  introNode.appendChild(textNode);
-
-  var okButton = document.documentElement.getButton("accept");
-  okButton.focus();
-
-  function okButtonCountdown() {
-    _installCountdown -= 1;
-
-    if (_installCountdown < 1) {
-      okButton.label = bundle.getString("installButtonLabel");
-      okButton.disabled = false;
-      clearInterval(_installCountdownInterval);
-    } else
-      okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown]);
-  }
-
-  function myfocus() {
-    // Clear the timeout if it exists so only the last one will be used.
-    if (_timeout)
-      clearTimeout(_timeout);
-
-    // Use setTimeout since the last focus or blur event to fire is the one we
-    // want
-    _timeout = setTimeout(setWidgetsAfterFocus, 0);
-  }
-
-  function setWidgetsAfterFocus() {
-    if (_focused)
-      return;
-
-    _installCountdown = _installCountdownLength;
-    _installCountdownInterval = setInterval(okButtonCountdown, 500);
-    okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown]);
-    _focused = true;
-  }
-
-  function myblur() {
-    // Clear the timeout if it exists so only the last one will be used.
-    if (_timeout)
-      clearTimeout(_timeout);
-
-    // Use setTimeout since the last focus or blur event to fire is the one we
-    // want
-    _timeout = setTimeout(setWidgetsAfterBlur, 0);
-  }
-
-  function setWidgetsAfterBlur() {
-    if (!_focused)
-      return;
-
-    // Set _installCountdown to the inital value set in setWidgetsAfterFocus
-    // plus 1 so when the window is focused there is immediate ui feedback.
-    _installCountdown = _installCountdownLength + 1;
-    okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown]);
-    okButton.disabled = true;
-    clearInterval(_installCountdownInterval);
-    _focused = false;
-  }
-
-  function myUnload() {
-    if (_installCountdownLength > 0) {
-      document.removeEventListener("focus", myfocus, true);
-      document.removeEventListener("blur", myblur, true);
-    }
-    window.removeEventListener("unload", myUnload);
-
-    for (let install of args.installs)
-      install.removeListener(installListener);
-
-    // Now perform the desired action - either install the
-    // addons or cancel the installations
-    if (XPInstallConfirm._installOK) {
-      for (let install of args.installs)
-        install.install();
-    } else {
-      for (let install of args.installs) {
-        if (install.state != AddonManager.STATE_CANCELLED)
-          install.cancel();
-      }
-    }
-  }
-
-  window.addEventListener("unload", myUnload);
-
-  if (_installCountdownLength > 0) {
-    document.addEventListener("focus", myfocus, true);
-    document.addEventListener("blur", myblur, true);
-
-    okButton.disabled = true;
-    setWidgetsAfterFocus();
-  } else
-    okButton.label = bundle.getString("installButtonLabel");
-};
-
-XPInstallConfirm.onOK = function() {
-  Services.telemetry.getHistogramById("SECURITY_UI")
-    .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL_CLICK_THROUGH);
-  // Perform the install or cancel after the window has unloaded
-  XPInstallConfirm._installOK = true;
-  return true;
-};
-
-XPInstallConfirm.onCancel = function() {
-  // Perform the install or cancel after the window has unloaded
-  XPInstallConfirm._installOK = false;
-  return true;
-};
deleted file mode 100644
--- a/toolkit/mozapps/extensions/content/xpinstallConfirm.xul
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://mozapps/content/xpinstall/xpinstallConfirm.css" type="text/css"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mozapps/skin/xpinstall/xpinstallConfirm.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://mozapps/locale/xpinstall/xpinstallConfirm.dtd">
-
-<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        id="xpinstallConfirm" title="&dialog.title;" style="&dialog.style;" 
-        windowtype="Addons:Install"
-        onload="XPInstallConfirm.init()" 
-        ondialogaccept="return XPInstallConfirm.onOK();"
-        ondialogcancel="return XPInstallConfirm.onCancel();">
-
-  <script src="chrome://mozapps/content/xpinstall/xpinstallConfirm.js" type="application/javascript"/>
-
-  <stringbundle id="xpinstallConfirmStrings" 
-                src="chrome://mozapps/locale/xpinstall/xpinstallConfirm.properties"/>
-
-  <vbox flex="1" id="dialogContentBox">
-    <hbox id="xpinstallheader" align="start">
-      <image class="alert-icon"/>
-      <vbox flex="1">
-        <description class="warning">&warningPrimary.label;</description>
-        <description>&warningSecondary.label;</description>
-      </vbox>
-    </hbox>
-    <label id="itemWarningIntro"/>
-    <vbox id="itemList" class="listbox" flex="1" style="overflow: auto;"/>
-  </vbox>
-
-</dialog>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/content/xpinstallItem.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!DOCTYPE bindings SYSTEM "chrome://mozapps/locale/xpinstall/xpinstallConfirm.dtd">
-
-<bindings id="xpinstallItemBindings"
-          xmlns="http://www.mozilla.org/xbl"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-          xmlns:xbl="http://www.mozilla.org/xbl">
-
-  <binding id="installitem">
-    <resources>
-      <stylesheet src="chrome://mozapps/skin/xpinstall/xpinstallConfirm.css"/>
-    </resources>
-    <content>
-      <xul:hbox flex="1">
-        <xul:vbox align="center" pack="center" class="xpinstallIconContainer">
-          <xul:image class="xpinstallItemIcon" xbl:inherits="src=icon"/>
-        </xul:vbox>
-        <xul:vbox flex="1" pack="center">
-          <xul:hbox class="xpinstallItemNameRow" align="center">
-            <xul:label class="xpinstallItemName" xbl:inherits="value=name" crop="right"/>
-          </xul:hbox>
-          <xul:hbox class="xpinstallItemDetailsRow" align="center">
-            <xul:textbox class="xpinstallItemURL" xbl:inherits="value=url" flex="1" readonly="true" crop="right"/>
-          </xul:hbox>
-        </xul:vbox> 
-      </xul:hbox>
-    </content>
-    <implementation>
-      <property name="name"   onset="this.setAttribute('name', val); return val;"
-                              onget="return this.getAttribute('name');"/>
-      <property name="cert"   onset="this.setAttribute('cert', val); return val;"
-                              onget="return this.getAttribute('cert');"/>
-      <property name="signed" onset="this.setAttribute('signed', val); return val;"
-                              onget="return this.getAttribute('signed');"/>
-      <property name="url"    onset="this.setAttribute('url', val); return val;"
-                              onget="return this.getAttribute('url');"/>
-      <property name="icon"   onset="this.setAttribute('icon', val); return val;"
-                              onget="return this.getAttribute('icon');"/>
-      <property name="type"   onset="this.setAttribute('type', val); return val;"
-                              onget="return this.getAttribute('type');"/>
-    </implementation>
-  </binding>
-         
-</bindings>
-
--- a/toolkit/mozapps/extensions/jar.mn
+++ b/toolkit/mozapps/extensions/jar.mn
@@ -16,12 +16,8 @@ toolkit.jar:
   content/mozapps/extensions/blocklist.css                      (content/blocklist.css)
   content/mozapps/extensions/blocklist.xml                      (content/blocklist.xml)
   content/mozapps/extensions/eula.xul                           (content/eula.xul)
   content/mozapps/extensions/eula.js                            (content/eula.js)
   content/mozapps/extensions/pluginPrefs.xul                    (content/pluginPrefs.xul)
   content/mozapps/extensions/pluginPrefs.js                     (content/pluginPrefs.js)
   content/mozapps/extensions/OpenH264-license.txt               (content/OpenH264-license.txt)
 #endif
-  content/mozapps/xpinstall/xpinstallConfirm.xul                (content/xpinstallConfirm.xul)
-  content/mozapps/xpinstall/xpinstallConfirm.js                 (content/xpinstallConfirm.js)
-  content/mozapps/xpinstall/xpinstallConfirm.css                (content/xpinstallConfirm.css)
-  content/mozapps/xpinstall/xpinstallItem.xml                   (content/xpinstallItem.xml)
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -29,17 +29,16 @@ const PREF_DISCOVERURL = "extensions.web
 const PREF_DISCOVER_ENABLED = "extensions.getAddons.showPane";
 const PREF_XPI_ENABLED = "xpinstall.enabled";
 const PREF_UPDATEURL = "extensions.update.url";
 const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled";
 const PREF_CUSTOM_XPINSTALL_CONFIRMATION_UI = "xpinstall.customConfirmationUI";
 const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
 
 const MANAGER_URI = "about:addons";
-const INSTALL_URI = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
 const PREF_LOGGING_ENABLED = "extensions.logging.enabled";
 const PREF_STRICT_COMPAT = "extensions.strictCompatibility";
 
 var PREF_CHECK_COMPATIBILITY;
 (function() {
   var channel = Services.prefs.getCharPref("app.update.channel", "default");
   if (channel != "aurora" &&
     channel != "beta" &&
--- a/toolkit/mozapps/extensions/test/xpinstall/head.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/head.js
@@ -1,15 +1,14 @@
 /* eslint no-unused-vars: ["error", {vars: "local", args: "none"}] */
 
 const RELATIVE_DIR = "toolkit/mozapps/extensions/test/xpinstall/";
 
 const TESTROOT = "http://example.com/browser/" + RELATIVE_DIR;
 const TESTROOT2 = "http://example.org/browser/" + RELATIVE_DIR;
-const XPINSTALL_URL = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
 const PROMPT_URL = "chrome://global/content/commonDialog.xul";
 const ADDONS_URL = "chrome://mozapps/content/extensions/extensions.xul";
 const PREF_LOGGING_ENABLED = "extensions.logging.enabled";
 const PREF_INSTALL_REQUIREBUILTINCERTS = "extensions.install.requireBuiltInCerts";
 const PREF_INSTALL_REQUIRESECUREORIGIN = "extensions.install.requireSecureOrigin";
 const PREF_CUSTOM_CONFIRMATION_UI = "xpinstall.customConfirmationUI";
 const CHROME_NAME = "mochikit";
 
@@ -182,39 +181,17 @@ var Harness = {
     this.runningInstalls = null;
 
     if (callback)
       executeSoon(() => callback(count));
   },
 
   // Window open handling
   windowReady(window) {
-    if (window.document.location.href == XPINSTALL_URL) {
-      if (this.installBlockedCallback)
-        ok(false, "Should have been blocked by the whitelist");
-      this.pendingCount = window.document.getElementById("itemList").childNodes.length;
-
-      // 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(window);
-        if (result === this.leaveOpen)
-          return;
-      }
-
-      if (!result) {
-        window.document.documentElement.cancelDialog();
-      } else {
-        // Initially the accept button is disabled on a countdown timer
-        var button = window.document.documentElement.getButton("accept");
-        button.disabled = false;
-        window.document.documentElement.acceptDialog();
-      }
-    } else if (window.document.location.href == PROMPT_URL) {
+    if (window.document.location.href == PROMPT_URL) {
         var promptType = window.args.promptType;
         switch (promptType) {
           case "alert":
           case "alertCheck":
           case "confirmCheck":
           case "confirm":
           case "confirmEx":
                 window.document.documentElement.acceptDialog();
deleted file mode 100644
--- a/toolkit/themes/osx/mozapps/extensions/xpinstallConfirm.css
+++ /dev/null
@@ -1,85 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#xpinstallheader {
-  margin-bottom: 2em;
-}
-
-.alert-icon {
-  width: 48px;
-  height: 48px;
-  list-style-image: url("chrome://global/skin/icons/warning-large.png");
-  margin-top: 0 !important;
-  margin-bottom: 6px !important;
-  margin-inline-start: 6px !important;
-  margin-inline-end: 20px !important;
-}
-
-#itemList {
-  -moz-appearance: listbox;
-  margin: 3px 4px 10px 4px;
-  height: 14em;
-}
-
-#itemWarningIntro {
-  margin-inline-start: 8px;
-}
-
-#dialogContentBox {
-  padding: 5px;
-}
-
-installitem {
-  padding: 5px 0 5px 5px;
-  border-bottom: 1px dotted #C0C0C0;
-  margin-bottom: 5px;
-}
-
-.warning {
-  font-weight: bold;
-  font-size: 1.25em;
-  margin-bottom: 1em;
-}
-
-.xpinstallIconContainer {
-  width: 32px;
-  height: 32px;
-  margin-inline-end: 5px;
-}
-
-.xpinstallItemName {
-  font-weight: bold;
-}
-
-.xpinstallItemURL {
-  -moz-appearance: none;
-  border: none;
-  background-color: Window;
-  margin-top: 2px;
-  margin-bottom: 1px;
-  margin-inline-start: 6px;
-  margin-inline-end: 5px;
-}
-
-.xpinstallItemIcon {
-  max-width: 32px;
-  max-height: 32px;
-  list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.svg");
-}
-
-installitem[type="theme"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.svg");
-}
-
-installitem[type="locale"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.svg");
-}
-
-installitem[type="plugin"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
-}
-
-installitem[type="dictionary"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/extensions/dictionaryGeneric.svg");
-}
--- a/toolkit/themes/osx/mozapps/jar.mn
+++ b/toolkit/themes/osx/mozapps/jar.mn
@@ -14,10 +14,9 @@ toolkit.jar:
   skin/classic/mozapps/extensions/heart.png                       (extensions/heart.png)
 * skin/classic/mozapps/extensions/extensions.css                  (extensions/extensions.css)
   skin/classic/mozapps/extensions/eula.css                        (extensions/eula.css)
   skin/classic/mozapps/extensions/blocklist.css                   (extensions/blocklist.css)
   skin/classic/mozapps/plugins/pluginHelp-16.png                  (plugins/pluginHelp-16.png)
   skin/classic/mozapps/profile/profileSelection.css               (profile/profileSelection.css)
   skin/classic/mozapps/update/buttons.png                         (update/buttons.png)
 * skin/classic/mozapps/update/updates.css                         (update/updates.css)
-  skin/classic/mozapps/xpinstall/xpinstallConfirm.css             (extensions/xpinstallConfirm.css)
   skin/classic/mozapps/handling/handling.css                      (handling/handling.css)
--- a/toolkit/themes/shared/non-mac.jar.inc.mn
+++ b/toolkit/themes/shared/non-mac.jar.inc.mn
@@ -39,11 +39,10 @@
   skin/classic/mozapps/extensions/rating-won.png             (../../windows/mozapps/extensions/rating-won.png)
   skin/classic/mozapps/extensions/rating-not-won.png         (../../windows/mozapps/extensions/rating-not-won.png)
   skin/classic/mozapps/extensions/cancel.png                 (../../windows/mozapps/extensions/cancel.png)
   skin/classic/mozapps/extensions/eula.css                   (../../windows/mozapps/extensions/eula.css)
   skin/classic/mozapps/handling/handling.css                 (../../windows/mozapps/handling/handling.css)
   skin/classic/mozapps/plugins/pluginHelp-16.png             (../../windows/mozapps/plugins/pluginHelp-16.png)
   skin/classic/mozapps/profile/profileSelection.css          (../../windows/mozapps/profile/profileSelection.css)
   skin/classic/mozapps/update/downloadButtons.png            (../../windows/mozapps/update/downloadButtons.png)
-* skin/classic/mozapps/xpinstall/xpinstallConfirm.css        (../../windows/mozapps/extensions/xpinstallConfirm.css)
 
 % override chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png       chrome://mozapps/skin/extensions/extensionGeneric.svg
deleted file mode 100644
--- a/toolkit/themes/windows/mozapps/extensions/xpinstallConfirm.css
+++ /dev/null
@@ -1,91 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#xpinstallheader {
-  margin-bottom: 2em;
-}
-
-#itemList {
-  -moz-appearance: listbox;
-  margin: 3px 4px 10px;
-  height: 14em;
-  background-color: -moz-Field;
-  color: -moz-FieldText;
-}
-
-#itemWarningIntro {
-  margin-inline-start: 8px;
-}
-
-#dialogContentBox {
-  padding: 5px;
-}
-
-installitem {
-  padding-top: 5px;
-  padding-bottom: 5px;
-  padding-inline-start: 5px;
-  padding-inline-end: 0;
-  border-bottom: 1px dotted ThreeDShadow;
-  margin-bottom: 5px;
-}
-
-.alert-icon {
-%ifdef XP_WIN
-  list-style-image: url("chrome://global/skin/icons/warning-large.png");
-  width: 48px;
-  height: 48px;
-%endif
-  margin-inline-end: 20px;
-}
-
-.warning {
-  font-weight: bold;
-  font-size: 1.25em;
-  margin-bottom: 1em;
-}
-
-.xpinstallIconContainer {
-  width: 32px;
-  height: 32px;
-  margin-inline-end: 5px;
-}
-
-.xpinstallItemName {
-  font-weight: bold;
-}
-
-.xpinstallItemURL {
-  -moz-appearance: none;
-  border: none;
-  padding: 0;
-  background-color: -moz-Field;
-  color: -moz-FieldText;
-  margin-top: 1px;
-  margin-bottom: 1px;
-  margin-inline-start: 6px;
-  margin-inline-end: 5px;
-}
-
-.xpinstallItemIcon {
-  max-width: 32px;
-  max-height: 32px;
-  list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.svg");
-}
-
-installitem[type="theme"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.svg");
-}
-
-installitem[type="locale"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.svg");
-}
-
-installitem[type="plugin"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
-}
-
-installitem[type="dictionary"] .xpinstallItemIcon {
-  list-style-image: url("chrome://mozapps/skin/extensions/dictionaryGeneric.svg");
-}