Bug 1318218 - Remove PermissionsTable; r=baku,jryans
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 16 Nov 2016 22:23:35 -0500
changeset 323336 592927e727fdc5b06ff76e4cca4fe94522dda73c
parent 323335 05b0351e7c59f8371e785ba8e988544d2111fa68
child 323337 1a66e7113e83e8dbb93bfb00eb5187a76feaaf6d
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersbaku, jryans
bugs1318218
milestone53.0a1
Bug 1318218 - Remove PermissionsTable; r=baku,jryans This also removes the WebIDE UI for viewing the permissions table.
addon-sdk/source/lib/dev/volcan.js
b2g/components/ContentPermissionPrompt.js
devtools/client/locales/en-US/webide.dtd
devtools/client/webide/content/jar.mn
devtools/client/webide/content/permissionstable.js
devtools/client/webide/content/permissionstable.xhtml
devtools/client/webide/content/runtime-listing.js
devtools/client/webide/content/runtime-listing.xhtml
devtools/client/webide/content/webide.js
devtools/client/webide/content/webide.xul
devtools/client/webide/modules/runtime-list.js
devtools/client/webide/test/chrome.ini
devtools/client/webide/test/test_device_permissions.html
devtools/client/webide/themes/jar.mn
devtools/client/webide/themes/panel-listing.css
devtools/client/webide/themes/permissionstable.css
devtools/server/actors/device.js
devtools/server/tests/mochitest/test_device.html
devtools/shared/specs/device.js
dom/apps/PermissionsTable.jsm
dom/apps/moz.build
dom/apps/tests/create_test_receipts.py
dom/apps/tests/head.js
dom/moz.build
dom/permission/moz.build
dom/permission/tests/file_framework.js
dom/permission/tests/file_shim.html
dom/permission/tests/mochitest-time.ini
dom/permission/tests/mochitest.ini
dom/permission/tests/test_browser.html
dom/permission/tests/test_idle.html
dom/permission/tests/test_input-manage.html
dom/permission/tests/test_keyboard.html
dom/permission/tests/test_networkstats-manage.html
dom/permission/tests/test_power.html
dom/permission/tests/test_presentation-device-manage.html
dom/permission/tests/test_systemXHR.html
dom/permission/tests/test_tcp-socket.html
dom/permission/tests/test_time.html
dom/permission/tests/test_udp-socket.html
dom/permission/tests/unit/test_bug808734.js
dom/permission/tests/unit/xpcshell.ini
dom/settings/SettingsRequestManager.jsm
tools/lint/eslint/modules.json
--- a/addon-sdk/source/lib/dev/volcan.js
+++ b/addon-sdk/source/lib/dev/volcan.js
@@ -3291,27 +3291,16 @@ module.exports={
           "request": {
             "type": "screenshotToDataURL"
           },
           "response": {
             "value": {
               "_retval": "longstring"
             }
           }
-        },
-        {
-          "name": "getRawPermissionsTable",
-          "request": {
-            "type": "getRawPermissionsTable"
-          },
-          "response": {
-            "value": {
-              "_retval": "json"
-            }
-          }
         }
       ],
       "events": {}
     }
   },
   "from": "root"
 }
 
--- a/b2g/components/ContentPermissionPrompt.js
+++ b/b2g/components/ContentPermissionPrompt.js
@@ -19,17 +19,16 @@ const PROMPT_FOR_UNKNOWN = ["audio-captu
                             "video-capture"];
 // Due to privary issue, permission requests like GetUserMedia should prompt
 // every time instead of providing session persistence.
 const PERMISSION_NO_SESSION = ["audio-capture", "video-capture"];
 const ALLOW_MULTIPLE_REQUESTS = ["audio-capture", "video-capture"];
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/PermissionsTable.jsm");
 
 var permissionManager = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
 var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
 
 var permissionSpecificChecker = {};
 
 XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy",
                                   "resource://gre/modules/SystemAppProxy.jsm");
@@ -62,66 +61,16 @@ function buildDefaultChoices(aTypesInfo)
         choices = {};
       }
       choices[type.access] = type.options[0];
     }
   }
   return choices;
 }
 
-/**
- * aTypesInfo is an array of {permission, access, action, deny} which keeps
- * the information of each permission. This arrary is initialized in
- * ContentPermissionPrompt.prompt and used among functions.
- *
- * aTypesInfo[].permission : permission name
- * aTypesInfo[].access     : permission name + request.access
- * aTypesInfo[].action     : the default action of this permission
- * aTypesInfo[].deny       : true if security manager denied this app's origin
- *                           principal.
- * Note:
- *   aTypesInfo[].permission will be sent to prompt only when
- *   aTypesInfo[].action is PROMPT_ACTION and aTypesInfo[].deny is false.
- */
-function rememberPermission(aTypesInfo, aPrincipal, aSession)
-{
-  function convertPermToAllow(aPerm, aPrincipal)
-  {
-    let type =
-      permissionManager.testExactPermissionFromPrincipal(aPrincipal, aPerm);
-    if (shouldPrompt(aPerm, type)) {
-      debug("add " + aPerm + " to permission manager with ALLOW_ACTION");
-      if (!aSession) {
-        permissionManager.addFromPrincipal(aPrincipal,
-                                           aPerm,
-                                           Ci.nsIPermissionManager.ALLOW_ACTION);
-      } else if (PERMISSION_NO_SESSION.indexOf(aPerm) < 0) {
-        permissionManager.addFromPrincipal(aPrincipal,
-                                           aPerm,
-                                           Ci.nsIPermissionManager.ALLOW_ACTION,
-                                           Ci.nsIPermissionManager.EXPIRE_SESSION, 0);
-      }
-    }
-  }
-
-  for (let i in aTypesInfo) {
-    // Expand the permission to see if we have multiple access properties
-    // to convert
-    let perm = aTypesInfo[i].permission;
-    let access = PermissionsTable[perm].access;
-    if (access) {
-      for (let idx in access) {
-        convertPermToAllow(perm + "-" + access[idx], aPrincipal);
-      }
-    } else {
-      convertPermToAllow(perm, aPrincipal);
-    }
-  }
-}
-
 function ContentPermissionPrompt() {}
 
 ContentPermissionPrompt.prototype = {
 
   handleExistingPermission: function handleExistingPermission(request,
                                                               typesInfo) {
     typesInfo.forEach(function(type) {
       type.action =
@@ -291,17 +240,16 @@ ContentPermissionPrompt.prototype = {
     this.sendToBrowserWindow("cancel-permission-prompt", request,
                              typesInfo);
   },
 
   delegatePrompt: function(request, typesInfo, callback) {
     this.sendToBrowserWindow("permission-prompt", request, typesInfo,
                              function(type, remember, choices) {
       if (type == "permission-allow") {
-        rememberPermission(typesInfo, request.principal, !remember);
         if (callback) {
           callback();
         }
         request.allow(choices);
         return;
       }
 
       let addDenyPermission = function(type) {
--- a/devtools/client/locales/en-US/webide.dtd
+++ b/devtools/client/locales/en-US/webide.dtd
@@ -27,18 +27,16 @@
 <!ENTITY projectMenu_manageComponents_label "Manage Extra Components">
 <!ENTITY projectMenu_manageComponents_accesskey "M">
 <!ENTITY projectMenu_refreshTabs_label "Refresh Tabs">
 
 <!ENTITY runtimeMenu_label "Runtime">
 <!ENTITY runtimeMenu_accesskey "R">
 <!ENTITY runtimeMenu_disconnect_label "Disconnect">
 <!ENTITY runtimeMenu_disconnect_accesskey "D">
-<!ENTITY runtimeMenu_showPermissionTable_label "Permissions Table">
-<!ENTITY runtimeMenu_showPermissionTable_accesskey "P">
 <!ENTITY runtimeMenu_takeScreenshot_label "Screenshot">
 <!ENTITY runtimeMenu_takeScreenshot_accesskey "S">
 <!ENTITY runtimeMenu_showDetails_label "Runtime Info">
 <!ENTITY runtimeMenu_showDetails_accesskey "E">
 <!ENTITY runtimeMenu_showMonitor_label "Monitor">
 <!ENTITY runtimeMenu_showMonitor_accesskey "M">
 <!ENTITY runtimeMenu_showDevicePrefs_label "Device Preferences">
 <!ENTITY runtimeMenu_showDevicePrefs_accesskey "D">
@@ -136,20 +134,16 @@
 <!ENTITY prefs_options_autocomplete_tooltip "Enable code autocompletion">
 <!ENTITY prefs_options_autoclosebrackets "Autoclose brackets">
 <!ENTITY prefs_options_autoclosebrackets_tooltip "Automatically insert closing brackets">
 <!ENTITY prefs_options_keybindings "Keybindings">
 <!ENTITY prefs_options_keybindings_default "Default">
 <!ENTITY prefs_options_autosavefiles "Autosave files">
 <!ENTITY prefs_options_autosavefiles_tooltip "Automatically save edited files before running project">
 
-<!-- Permissions Table -->
-<!ENTITY permissionstable_title "Permissions Table">
-<!ENTITY permissionstable_name_header "Name">
-
 <!-- Runtime Details -->
 <!ENTITY runtimedetails_title "Runtime Info">
 <!ENTITY runtimedetails_adbIsRoot "ADB is root: ">
 <!ENTITY runtimedetails_summonADBRoot "root device">
 <!ENTITY runtimedetails_ADBRootWarning "(requires unlocked bootloader)">
 <!ENTITY runtimedetails_unrestrictedPrivileges "Unrestricted DevTools privileges: ">
 <!ENTITY runtimedetails_requestPrivileges "request higher privileges">
 <!ENTITY runtimedetails_privilegesWarning "(Will reboot device. Requires root access.)">
--- a/devtools/client/webide/content/jar.mn
+++ b/devtools/client/webide/content/jar.mn
@@ -7,18 +7,16 @@ webide.jar:
     content/webide.xul                (webide.xul)
     content/webide.js                 (webide.js)
     content/newapp.xul                (newapp.xul)
     content/newapp.js                 (newapp.js)
     content/details.xhtml             (details.xhtml)
     content/details.js                (details.js)
     content/addons.js                 (addons.js)
     content/addons.xhtml              (addons.xhtml)
-    content/permissionstable.js       (permissionstable.js)
-    content/permissionstable.xhtml    (permissionstable.xhtml)
     content/runtimedetails.js         (runtimedetails.js)
     content/runtimedetails.xhtml      (runtimedetails.xhtml)
     content/prefs.js                  (prefs.js)
     content/prefs.xhtml               (prefs.xhtml)
     content/monitor.xhtml             (monitor.xhtml)
     content/monitor.js                (monitor.js)
     content/devicepreferences.js      (devicepreferences.js)
     content/devicepreferences.xhtml   (devicepreferences.xhtml)
deleted file mode 100644
--- a/devtools/client/webide/content/permissionstable.js
+++ /dev/null
@@ -1,78 +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/. */
-
-var Cu = Components.utils;
-const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
-const Services = require("Services");
-const {AppManager} = require("devtools/client/webide/modules/app-manager");
-const {Connection} = require("devtools/shared/client/connection-manager");
-
-window.addEventListener("load", function onLoad() {
-  window.removeEventListener("load", onLoad);
-  document.querySelector("#close").onclick = CloseUI;
-  AppManager.on("app-manager-update", OnAppManagerUpdate);
-  BuildUI();
-}, true);
-
-window.addEventListener("unload", function onUnload() {
-  window.removeEventListener("unload", onUnload);
-  AppManager.off("app-manager-update", OnAppManagerUpdate);
-});
-
-function CloseUI() {
-  window.parent.UI.openProject();
-}
-
-function OnAppManagerUpdate(event, what) {
-  if (what == "connection" || what == "runtime-global-actors") {
-    BuildUI();
-  }
-}
-
-function generateFields(json) {
-  let table = document.querySelector("table");
-  let permissionsTable = json.rawPermissionsTable;
-  for (let name in permissionsTable) {
-    let tr = document.createElement("tr");
-    tr.className = "line";
-    let td = document.createElement("td");
-    td.textContent = name;
-    tr.appendChild(td);
-    for (let type of ["app", "privileged", "certified"]) {
-      let td = document.createElement("td");
-      if (permissionsTable[name][type] == json.ALLOW_ACTION) {
-        td.textContent = "✓";
-        td.className = "permallow";
-      }
-      if (permissionsTable[name][type] == json.PROMPT_ACTION) {
-        td.textContent = "!";
-        td.className = "permprompt";
-      }
-      if (permissionsTable[name][type] == json.DENY_ACTION) {
-        td.textContent = "✕";
-        td.className = "permdeny";
-      }
-      tr.appendChild(td);
-    }
-    table.appendChild(tr);
-  }
-}
-
-var getRawPermissionsTablePromise; // Used by tests
-function BuildUI() {
-  let table = document.querySelector("table");
-  let lines = table.querySelectorAll(".line");
-  for (let line of lines) {
-    line.remove();
-  }
-
-  if (AppManager.connection &&
-      AppManager.connection.status == Connection.Status.CONNECTED &&
-      AppManager.deviceFront) {
-    getRawPermissionsTablePromise = AppManager.deviceFront.getRawPermissionsTable()
-                                    .then(json => generateFields(json));
-  } else {
-    CloseUI();
-  }
-}
deleted file mode 100644
--- a/devtools/client/webide/content/permissionstable.xhtml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- 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 html [
-  <!ENTITY % webideDTD SYSTEM "chrome://devtools/locale/webide.dtd" >
-  %webideDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta charset="utf8"/>
-    <link rel="stylesheet" href="chrome://webide/skin/deck.css" type="text/css"/>
-    <link rel="stylesheet" href="chrome://webide/skin/permissionstable.css" type="text/css"/>
-    <script type="application/javascript;version=1.8" src="chrome://webide/content/permissionstable.js"></script>
-  </head>
-  <body>
-
-    <div id="controls">
-      <a id="close">&deck_close;</a>
-    </div>
-
-    <h1>&permissionstable_title;</h1>
-
-    <table class="permissionstable">
-      <tr>
-        <th>&permissionstable_name_header;</th>
-        <th>type:web</th>
-        <th>type:privileged</th>
-        <th>type:certified</th>
-      </tr>
-    </table>
-  </body>
-</html>
--- a/devtools/client/webide/content/runtime-listing.js
+++ b/devtools/client/webide/content/runtime-listing.js
@@ -6,17 +6,16 @@ var Cu = Components.utils;
 const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
 const RuntimeList = require("devtools/client/webide/modules/runtime-list");
 
 var runtimeList = new RuntimeList(window, window.parent);
 
 window.addEventListener("load", function onLoad() {
   window.removeEventListener("load", onLoad, true);
   document.getElementById("runtime-screenshot").onclick = TakeScreenshot;
-  document.getElementById("runtime-permissions").onclick = ShowPermissionsTable;
   document.getElementById("runtime-details").onclick = ShowRuntimeDetails;
   document.getElementById("runtime-disconnect").onclick = DisconnectRuntime;
   document.getElementById("runtime-preferences").onclick = ShowDevicePreferences;
   document.getElementById("runtime-settings").onclick = ShowSettings;
   document.getElementById("runtime-panel-installsimulator").onclick = ShowAddons;
   document.getElementById("runtime-panel-noadbhelper").onclick = ShowAddons;
   document.getElementById("runtime-panel-nousbdevice").onclick = ShowTroubleShooting;
   document.getElementById("refresh-devices").onclick = RefreshScanners;
@@ -32,20 +31,16 @@ window.addEventListener("unload", functi
 function TakeScreenshot() {
   runtimeList.takeScreenshot();
 }
 
 function ShowRuntimeDetails() {
   runtimeList.showRuntimeDetails();
 }
 
-function ShowPermissionsTable() {
-  runtimeList.showPermissionsTable();
-}
-
 function ShowDevicePreferences() {
   runtimeList.showDevicePreferences();
 }
 
 function ShowSettings() {
   runtimeList.showSettings();
 }
 
--- a/devtools/client/webide/content/runtime-listing.xhtml
+++ b/devtools/client/webide/content/runtime-listing.xhtml
@@ -28,17 +28,16 @@
         <div id="runtime-panel-wifi"></div>
         <label class="panel-header">&runtimePanel_simulator;</label>
         <div id="runtime-panel-simulator"></div>
         <button class="panel-item" id="runtime-panel-installsimulator">&runtimePanel_installsimulator;</button>
         <label class="panel-header">&runtimePanel_other;</label>
         <div id="runtime-panel-other"></div>
         <div id="runtime-actions">
           <button class="panel-item" id="runtime-details">&runtimeMenu_showDetails_label;</button>
-          <button class="panel-item" id="runtime-permissions">&runtimeMenu_showPermissionTable_label;</button>
           <button class="panel-item" id="runtime-preferences">&runtimeMenu_showDevicePrefs_label;</button>
           <button class="panel-item" id="runtime-settings">&runtimeMenu_showSettings_label;</button>
           <button class="panel-item" id="runtime-screenshot">&runtimeMenu_takeScreenshot_label;</button>
           <button class="panel-item" id="runtime-disconnect">&runtimeMenu_disconnect_label;</button>
         </div>
       </div>
     </div>
   </body>
--- a/devtools/client/webide/content/webide.js
+++ b/devtools/client/webide/content/webide.js
@@ -435,40 +435,37 @@ var UI = {
           playCmd.setAttribute("disabled", "true");
         }
       }
     }
 
     // Runtime commands
     let monitorCmd = document.querySelector("#cmd_showMonitor");
     let screenshotCmd = document.querySelector("#cmd_takeScreenshot");
-    let permissionsCmd = document.querySelector("#cmd_showPermissionsTable");
     let detailsCmd = document.querySelector("#cmd_showRuntimeDetails");
     let disconnectCmd = document.querySelector("#cmd_disconnectRuntime");
     let devicePrefsCmd = document.querySelector("#cmd_showDevicePrefs");
     let settingsCmd = document.querySelector("#cmd_showSettings");
 
     if (AppManager.connected) {
       if (AppManager.deviceFront) {
         monitorCmd.removeAttribute("disabled");
         detailsCmd.removeAttribute("disabled");
-        permissionsCmd.removeAttribute("disabled");
         screenshotCmd.removeAttribute("disabled");
       }
       if (AppManager.preferenceFront) {
         devicePrefsCmd.removeAttribute("disabled");
       }
       if (AppManager.settingsFront) {
         settingsCmd.removeAttribute("disabled");
       }
       disconnectCmd.removeAttribute("disabled");
     } else {
       monitorCmd.setAttribute("disabled", "true");
       detailsCmd.setAttribute("disabled", "true");
-      permissionsCmd.setAttribute("disabled", "true");
       screenshotCmd.setAttribute("disabled", "true");
       disconnectCmd.setAttribute("disabled", "true");
       devicePrefsCmd.setAttribute("disabled", "true");
       settingsCmd.setAttribute("disabled", "true");
     }
 
     let runtimePanelButton = document.querySelector("#runtime-panel-button");
 
@@ -1042,20 +1039,16 @@ var Cmds = {
     return UI.busyUntil(url.then(longstr => {
       return longstr.string().then(dataURL => {
         longstr.release().then(null, console.error);
         UI.openInBrowser(dataURL);
       });
     }), "taking screenshot");
   },
 
-  showPermissionsTable: function () {
-    UI.selectDeckPanel("permissionstable");
-  },
-
   showRuntimeDetails: function () {
     UI.selectDeckPanel("runtimedetails");
   },
 
   showDevicePrefs: function () {
     UI.selectDeckPanel("devicepreferences");
   },
 
--- a/devtools/client/webide/content/webide.xul
+++ b/devtools/client/webide/content/webide.xul
@@ -40,17 +40,16 @@
       <command id="cmd_importHostedApp" oncommand="Cmds.importHostedApp()" label="&projectMenu_importHostedApp_label;"/>
       <command id="cmd_showDevicePrefs" label="&runtimeMenu_showDevicePrefs_label;" oncommand="Cmds.showDevicePrefs()"/>
       <command id="cmd_showSettings" label="&runtimeMenu_showSettings_label;" oncommand="Cmds.showSettings()"/>
       <command id="cmd_removeProject" oncommand="Cmds.removeProject()" label="&projectMenu_remove_label;"/>
       <command id="cmd_showProjectPanel" oncommand="Cmds.showProjectPanel()"/>
       <command id="cmd_showRuntimePanel" oncommand="Cmds.showRuntimePanel()"/>
       <command id="cmd_disconnectRuntime" oncommand="Cmds.disconnectRuntime()" label="&runtimeMenu_disconnect_label;"/>
       <command id="cmd_showMonitor" oncommand="Cmds.showMonitor()" label="&runtimeMenu_showMonitor_label;"/>
-      <command id="cmd_showPermissionsTable" oncommand="Cmds.showPermissionsTable()" label="&runtimeMenu_showPermissionTable_label;"/>
       <command id="cmd_showRuntimeDetails" oncommand="Cmds.showRuntimeDetails()" label="&runtimeMenu_showDetails_label;"/>
       <command id="cmd_takeScreenshot" oncommand="Cmds.takeScreenshot()" label="&runtimeMenu_takeScreenshot_label;"/>
       <command id="cmd_toggleEditor" oncommand="Cmds.toggleEditors()" label="&viewMenu_toggleEditor_label;"/>
       <command id="cmd_showAddons" oncommand="Cmds.showAddons()"/>
       <command id="cmd_showPrefs" oncommand="Cmds.showPrefs()"/>
       <command id="cmd_showTroubleShooting" oncommand="Cmds.showTroubleShooting()"/>
       <command id="cmd_play" oncommand="Cmds.play()"/>
       <command id="cmd_stop" oncommand="Cmds.stop()" label="&projectMenu_stop_label;"/>
@@ -79,17 +78,16 @@
         <menuitem command="cmd_showAddons" label="&projectMenu_manageComponents_label;" accesskey="&projectMenu_manageComponents_accesskey;"/>
       </menupopup>
     </menu>
 
     <menu id="menu-runtime" label="&runtimeMenu_label;" accesskey="&runtimeMenu_accesskey;">
       <menupopup id="menu-runtime-popup">
         <menuitem command="cmd_showMonitor" accesskey="&runtimeMenu_showMonitor_accesskey;"/>
         <menuitem command="cmd_takeScreenshot" accesskey="&runtimeMenu_takeScreenshot_accesskey;"/>
-        <menuitem command="cmd_showPermissionsTable" accesskey="&runtimeMenu_showPermissionTable_accesskey;"/>
         <menuitem command="cmd_showRuntimeDetails" accesskey="&runtimeMenu_showDetails_accesskey;"/>
         <menuitem command="cmd_showDevicePrefs" accesskey="&runtimeMenu_showDevicePrefs_accesskey;"/>
         <menuitem command="cmd_showSettings" accesskey="&runtimeMenu_showSettings_accesskey;"/>
         <menuseparator/>
         <menuitem command="cmd_disconnectRuntime" accesskey="&runtimeMenu_disconnect_accesskey;"/>
       </menupopup>
     </menu>
 
@@ -151,17 +149,16 @@
         </div>
       </vbox>
       <splitter class="devtools-side-splitter" id="project-listing-splitter"/>
       <deck flex="1" id="deck" selectedIndex="-1">
         <iframe id="deck-panel-details" flex="1" src="details.xhtml"/>
         <iframe id="deck-panel-projecteditor" flex="1"/>
         <iframe id="deck-panel-addons" flex="1" src="addons.xhtml"/>
         <iframe id="deck-panel-prefs" flex="1" src="prefs.xhtml"/>
-        <iframe id="deck-panel-permissionstable" flex="1" lazysrc="permissionstable.xhtml"/>
         <iframe id="deck-panel-runtimedetails" flex="1" lazysrc="runtimedetails.xhtml"/>
         <iframe id="deck-panel-monitor" flex="1" lazysrc="monitor.xhtml"/>
         <iframe id="deck-panel-devicepreferences" flex="1" lazysrc="devicepreferences.xhtml"/>
         <iframe id="deck-panel-devicesettings" flex="1" lazysrc="devicesettings.xhtml"/>
         <iframe id="deck-panel-logs" flex="1" src="logs.xhtml"/>
         <iframe id="deck-panel-simulator" flex="1" lazysrc="simulator.xhtml"/>
       </deck>
       <splitter class="devtools-side-splitter" id="runtime-listing-splitter"/>
--- a/devtools/client/webide/modules/runtime-list.js
+++ b/devtools/client/webide/modules/runtime-list.js
@@ -61,20 +61,16 @@ RuntimeList.prototype = {
   takeScreenshot: function () {
     this._Cmds.takeScreenshot();
   },
 
   showRuntimeDetails: function () {
     this._Cmds.showRuntimeDetails();
   },
 
-  showPermissionsTable: function () {
-    this._Cmds.showPermissionsTable();
-  },
-
   showDevicePreferences: function () {
     this._Cmds.showDevicePrefs();
   },
 
   showSettings: function () {
     this._Cmds.showSettings();
   },
 
@@ -90,38 +86,35 @@ RuntimeList.prototype = {
     RuntimeScanners.scan();
   },
 
   updateCommands: function () {
     let doc = this._doc;
 
     // Runtime commands
     let screenshotCmd = doc.querySelector("#runtime-screenshot");
-    let permissionsCmd = doc.querySelector("#runtime-permissions");
     let detailsCmd = doc.querySelector("#runtime-details");
     let disconnectCmd = doc.querySelector("#runtime-disconnect");
     let devicePrefsCmd = doc.querySelector("#runtime-preferences");
     let settingsCmd = doc.querySelector("#runtime-settings");
 
     if (AppManager.connected) {
       if (AppManager.deviceFront) {
         detailsCmd.removeAttribute("disabled");
-        permissionsCmd.removeAttribute("disabled");
         screenshotCmd.removeAttribute("disabled");
       }
       if (AppManager.preferenceFront) {
         devicePrefsCmd.removeAttribute("disabled");
       }
       if (AppManager.settingsFront) {
         settingsCmd.removeAttribute("disabled");
       }
       disconnectCmd.removeAttribute("disabled");
     } else {
       detailsCmd.setAttribute("disabled", "true");
-      permissionsCmd.setAttribute("disabled", "true");
       screenshotCmd.setAttribute("disabled", "true");
       disconnectCmd.setAttribute("disabled", "true");
       devicePrefsCmd.setAttribute("disabled", "true");
       settingsCmd.setAttribute("disabled", "true");
     }
   },
 
   update: function () {
--- a/devtools/client/webide/test/chrome.ini
+++ b/devtools/client/webide/test/chrome.ini
@@ -49,17 +49,16 @@ support-files =
 skip-if = (os == "win" && os_version == "10.0") # Bug 1197053
 [test_import.html]
 [test_duplicate_import.html]
 [test_runtime.html]
 [test_manifestUpdate.html]
 [test_addons.html]
 skip-if = true # Bug 1201392 - Update add-ons after migration
 [test_device_runtime.html]
-[test_device_permissions.html]
 [test_autoconnect_runtime.html]
 [test_autoselect_project.html]
 [test_telemetry.html]
 skip-if = true # Bug 1201392 - Update add-ons after migration
 [test_device_preferences.html]
 [test_device_settings.html]
 [test_fullscreenToolbox.html]
 [test_zoom.html]
deleted file mode 100644
--- a/devtools/client/webide/test/test_device_permissions.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-
-  <head>
-    <meta charset="utf8">
-    <title></title>
-
-    <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-    <script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"></script>
-    <script type="application/javascript;version=1.8" src="head.js"></script>
-    <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-  </head>
-
-  <body>
-
-    <script type="application/javascript;version=1.8">
-      window.onload = function() {
-        SimpleTest.waitForExplicitFinish();
-
-        Task.spawn(function* () {
-          if (!DebuggerServer.initialized) {
-            DebuggerServer.init();
-            DebuggerServer.addBrowserActors();
-          }
-
-          let win = yield openWebIDE();
-
-          let permIframe = win.document.querySelector("#deck-panel-permissionstable");
-          let docRuntime = getRuntimeDocument(win);
-          let winRuntime = getRuntimeWindow(win);
-
-          yield connectToLocalRuntime(win);
-
-          let perm = docRuntime.querySelector("#runtime-permissions");
-
-          ok(!perm.hasAttribute("disabled"), "perm cmd enabled");
-
-          let deck = win.document.querySelector("#deck");
-
-          winRuntime.runtimeList.showPermissionsTable();
-          is(deck.selectedPanel, permIframe, "permission iframe selected");
-
-          yield nextTick();
-
-          yield lazyIframeIsLoaded(permIframe);
-
-          yield permIframe.contentWindow.getRawPermissionsTablePromise;
-
-          doc = permIframe.contentWindow.document;
-          trs = doc.querySelectorAll(".line");
-          found = false;
-          for (let tr of trs) {
-            let [name,v1,v2,v3] = tr.querySelectorAll("td");
-            if (name.textContent == "geolocation") {
-              found = true;
-              is(v1.className, "permprompt", "geolocation perm is valid");
-              is(v2.className, "permprompt", "geolocation perm is valid");
-              is(v3.className, "permprompt", "geolocation perm is valid");
-              break;
-            }
-          }
-          ok(found, "Found geolocation line");
-
-          doc.querySelector("#close").click();
-
-          ok(!deck.selectedPanel, "No panel selected");
-
-          DebuggerServer.destroy();
-
-          yield closeWebIDE(win);
-
-          SimpleTest.finish();
-        }).then(null, e => {
-          ok(false, "Exception: " + e);
-          SimpleTest.finish();
-        });
-      }
-    </script>
-  </body>
-</html>
--- a/devtools/client/webide/themes/jar.mn
+++ b/devtools/client/webide/themes/jar.mn
@@ -7,17 +7,16 @@ webide.jar:
 * skin/webide.css              (webide.css)
   skin/icons.png               (icons.png)
   skin/details.css             (details.css)
   skin/newapp.css              (newapp.css)
   skin/throbber.svg            (throbber.svg)
   skin/deck.css                (deck.css)
   skin/addons.css              (addons.css)
   skin/runtimedetails.css      (runtimedetails.css)
-  skin/permissionstable.css    (permissionstable.css)
   skin/monitor.css             (monitor.css)
   skin/config-view.css         (config-view.css)
   skin/wifi-auth.css           (wifi-auth.css)
   skin/logs.css                (logs.css)
   skin/panel-listing.css       (panel-listing.css)
   skin/simulator.css           (simulator.css)
   skin/rocket.svg              (rocket.svg)
   skin/noise.png               (noise.png)
--- a/devtools/client/webide/themes/panel-listing.css
+++ b/devtools/client/webide/themes/panel-listing.css
@@ -125,17 +125,16 @@ button.panel-item:not(:disabled):hover {
 
 .configure-button:hover {
   cursor: pointer;
 }
 
 .project-panel-item-openpackaged  { background-image: -moz-image-rect(url("icons.png"), 260, 438, 286, 412); }
 .runtime-panel-item-simulator     { background-image: -moz-image-rect(url("icons.png"), 0, 438, 26, 412); }
 .runtime-panel-item-other         { background-image: -moz-image-rect(url("icons.png"), 26, 438, 52, 412); }
-#runtime-permissions              { background-image: -moz-image-rect(url("icons.png"), 105, 438, 131, 412); }
 #runtime-screenshot               { background-image: -moz-image-rect(url("icons.png"), 131, 438, 156, 412); }
 
 #runtime-preferences,
 #runtime-settings                 { background-image: -moz-image-rect(url("icons.png"), 105, 464, 131, 438); }
 
 #runtime-panel-nousbdevice,
 #runtime-details                  { background-image: -moz-image-rect(url("icons.png"), 156, 438, 182, 412);  }
 
deleted file mode 100644
--- a/devtools/client/webide/themes/permissionstable.css
+++ /dev/null
@@ -1,23 +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/. */
-
-html, body {
-  background: white;
-}
-
-.permissionstable td {
-  text-align: center;
-}
-
-.permallow {
-  color: rgb(152,207,57);
-}
-
-.permprompt {
-  color: rgb(0,158,237);
-}
-
-.permdeny {
-  color: rgb(204,73,8);
-}
--- a/devtools/server/actors/device.js
+++ b/devtools/server/actors/device.js
@@ -8,17 +8,16 @@ const {Ci} = require("chrome");
 const Services = require("Services");
 const protocol = require("devtools/shared/protocol");
 const promise = require("promise");
 const {LongStringActor} = require("devtools/server/actors/string");
 const {DebuggerServer} = require("devtools/server/main");
 const {getSystemInfo, getSetting} = require("devtools/shared/system");
 const {deviceSpec} = require("devtools/shared/specs/device");
 const FileReader = require("FileReader");
-const {PermissionsTable} = require("resource://gre/modules/PermissionsTable.jsm");
 
 var DeviceActor = exports.DeviceActor = protocol.ActorClassWithSpec(deviceSpec, {
   _desc: null,
 
   getDescription: function () {
     return getSystemInfo();
   },
 
@@ -51,20 +50,10 @@ var DeviceActor = exports.DeviceActor = 
     let flags =
           context.DRAWWINDOW_DRAW_CARET |
           context.DRAWWINDOW_DRAW_VIEW |
           context.DRAWWINDOW_USE_WIDGET_LAYERS;
     context.scale(devicePixelRatio, devicePixelRatio);
     context.drawWindow(window, 0, 0, width, height, "rgb(255,255,255)", flags);
     let dataURL = canvas.toDataURL("image/png");
     return new LongStringActor(this.conn, dataURL);
-  },
-
-  getRawPermissionsTable: function () {
-    return {
-      rawPermissionsTable: PermissionsTable,
-      UNKNOWN_ACTION: Ci.nsIPermissionManager.UNKNOWN_ACTION,
-      ALLOW_ACTION: Ci.nsIPermissionManager.ALLOW_ACTION,
-      DENY_ACTION: Ci.nsIPermissionManager.DENY_ACTION,
-      PROMPT_ACTION: Ci.nsIPermissionManager.PROMPT_ACTION
-    };
   }
 });
--- a/devtools/server/tests/mochitest/test_device.html
+++ b/devtools/server/tests/mochitest/test_device.html
@@ -13,17 +13,16 @@ Bug 895360 - [app manager] Device meta d
 <pre id="test">
 <script>
 
 window.onload = function() {
   var Cu = Components.utils;
   var Cc = Components.classes;
   var Ci = Components.interfaces;
 
-  Cu.import("resource://gre/modules/PermissionsTable.jsm");
   var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
   var {DebuggerClient} = require("devtools/shared/client/main");
   var {DebuggerServer} = require("devtools/server/main");
   var Services = require("Services");
 
   SimpleTest.waitForExplicitFinish();
 
   var {getDeviceFront} = require("devtools/shared/fronts/device");
@@ -33,17 +32,17 @@ window.onload = function() {
     DebuggerServer.addBrowserActors();
   }
 
   var client = new DebuggerClient(DebuggerServer.connectPipe());
   client.connect().then(function onConnect() {
     client.listTabs(function onListTabs(aResponse) {
       var d = getDeviceFront(client, aResponse);
 
-      var desc, permissions;
+      var desc;
       var appInfo = Services.appinfo;
       var utils = window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
 
 
       var localDesc = {
         appid: appInfo.ID,
         vendor: appInfo.vendor,
         name: appInfo.name,
@@ -67,31 +66,24 @@ window.onload = function() {
         for (var key in localDesc) {
           is(desc[key], localDesc[key], "valid field (" + key + ")");
         }
 
         var currProfD = Services.dirsvc.get("ProfD", Ci.nsIFile);
         var profileDir = currProfD.path;
         ok(profileDir.indexOf(desc.profile.length > 0 && desc.profile) != -1, "valid profile name");
 
-        var a = JSON.stringify(PermissionsTable);
-        var b = JSON.stringify(permissions.rawPermissionsTable);
-
-        is(a, b, "Permissions Tables is valid");
-
         client.close().then(() => {
           DebuggerServer.destroy();
           SimpleTest.finish()
         });
       }
 
 
       d.getDescription().then((v) => desc = v)
-      .then(() => d.getRawPermissionsTable())
-      .then((json) => permissions = json)
       .then(checkValues);
 
     });
   });
 
 }
 </script>
 </pre>
--- a/devtools/shared/specs/device.js
+++ b/devtools/shared/specs/device.js
@@ -7,13 +7,12 @@ const {RetVal, generateActorSpec} = requ
 
 const deviceSpec = generateActorSpec({
   typeName: "device",
 
   methods: {
     getDescription: {request: {}, response: { value: RetVal("json")}},
     getWallpaper: {request: {}, response: { value: RetVal("longstring")}},
     screenshotToDataURL: {request: {}, response: { value: RetVal("longstring")}},
-    getRawPermissionsTable: {request: {}, response: { value: RetVal("json")}},
   },
 });
 
 exports.deviceSpec = deviceSpec;
deleted file mode 100644
--- a/dom/apps/PermissionsTable.jsm
+++ /dev/null
@@ -1,583 +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/. */
-
-"use strict";
-
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-
-this.EXPORTED_SYMBOLS = [
-  "PermissionsTable",
-  "PermissionsReverseTable",
-  "expandPermissions",
-  "appendAccessToPermName",
-  "isExplicitInPermissionsTable",
-  "AllPossiblePermissions"
-];
-
-// Permission access flags
-const READONLY = "readonly";
-const CREATEONLY = "createonly";
-const READCREATE = "readcreate";
-const READWRITE = "readwrite";
-
-const UNKNOWN_ACTION = Ci.nsIPermissionManager.UNKNOWN_ACTION;
-const ALLOW_ACTION = Ci.nsIPermissionManager.ALLOW_ACTION;
-const DENY_ACTION = Ci.nsIPermissionManager.DENY_ACTION;
-const PROMPT_ACTION = Ci.nsIPermissionManager.PROMPT_ACTION;
-
-// Permissions Matrix: https://docs.google.com/spreadsheet/ccc?key=0Akyz_Bqjgf5pdENVekxYRjBTX0dCXzItMnRyUU1RQ0E#gid=0
-
-// Permissions that are implicit:
-// battery-status, network-information, vibration,
-// device-capabilities
-
-this.PermissionsTable =  { geolocation: {
-                             app: PROMPT_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: PROMPT_ACTION
-                           },
-                           "geolocation-noprompt": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION,
-                             substitute: ["geolocation"]
-                           },
-                           camera: {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           alarms: {
-                             app: ALLOW_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "tcp-socket": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "udp-socket": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "network-events": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           contacts: {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
-                           },
-                           "device-storage:apps": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read"]
-                           },
-                           "device-storage:crashes": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read"]
-                           },
-                           "device-storage:pictures": {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
-                           },
-                           "device-storage:videos": {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
-                           },
-                           "device-storage:music": {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
-                           },
-                           "device-storage:sdcard": {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
-                           },
-                           sms: {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "speech-recognition": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           browser: {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "browser:universalxss": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           mobilenetwork: {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           power: {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           push: {
-                            app: ALLOW_ACTION,
-                            privileged: ALLOW_ACTION,
-                            certified: ALLOW_ACTION
-                           },
-                           settings: {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write"],
-                             additional: ["indexedDB-chrome-settings", "settings-api"]
-                           },
-                           // This exists purely for tests, no app
-                           // should ever use it. It can only be
-                           // handed out by SpecialPowers.
-                           "settings-clear": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: DENY_ACTION,
-                             additional: ["indexedDB-chrome-settings", "settings-api"]
-                           },
-                           permissions: {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           attention: {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "global-clickthrough-overlay": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "moz-attention": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION,
-                             substitute: ["attention"]
-                           },
-                           "webapps-manage": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "homescreen-webapps-manage": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "backgroundservice": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "desktop-notification": {
-                             app: ALLOW_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "networkstats-manage": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "wifi-manage": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "systemXHR": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "idle": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "time": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "background-sensors": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-channel-normal": {
-                             app: ALLOW_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-channel-content": {
-                             app: ALLOW_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-channel-notification": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-channel-alarm": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-channel-system": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-channel-telephony": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "moz-audio-channel-telephony": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION,
-                             substitute: ["audio-channel-telephony"]
-                           },
-                           "audio-channel-ringer": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "moz-audio-channel-ringer": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION,
-                             substitute: ["audio-channel-ringer"]
-                           },
-                           "audio-channel-publicnotification": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "open-remote-window": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "input": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "input-manage": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-capture": {
-                             app: PROMPT_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-capture:3gpp": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "audio-capture:3gpp2": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "speaker-control": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "downloads": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "video-capture": {
-                             app: PROMPT_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "feature-detection": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           // This permission doesn't actually grant access to
-                           // anything. It exists only to check the correctness
-                           // of web prompt composed permissions in tests.
-                           "test-permission": {
-                             app: PROMPT_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
-                           },
-                           "firefox-accounts": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "moz-firefox-accounts": {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             substitute: ["firefox-accounts"]
-                           },
-                           "themeable": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "settings:wallpaper.image": {
-                             app: DENY_ACTION,
-                             privileged: ALLOW_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write"],
-                             additional: ["settings-api"]
-                           },
-                           "tv": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "before-after-keyboard-event": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "presentation-device-manage": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "secureelement-manage": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "inputport": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "system-update": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "open-hidden-window": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "moz-extremely-unstable-and-will-change-webcomponents": {
-                              app: DENY_ACTION,
-                              trusted: DENY_ACTION,
-                              privileged: ALLOW_ACTION,
-                              certified: ALLOW_ACTION
-                           },
-                           "system-app-only-audio-channels-in-app": {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
-                           "previously-certified-app": {
-                             app: DENY_ACTION,
-                             trusted: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           }
-                         };
-
-/**
- * Append access modes to the permission name as suffixes.
- *   e.g. permission name 'contacts' with ['read', 'write'] =
- *   ['contacts-read', contacts-write']
- * @param string aPermName
- * @param array aAccess
- * @returns array containing access-appended permission names.
- **/
-this.appendAccessToPermName = function appendAccessToPermName(aPermName, aAccess) {
-  if (aAccess.length == 0) {
-    return [aPermName];
-  }
-  return aAccess.map(function(aMode) {
-    return aPermName + "-" + aMode;
-  });
-};
-
-/**
- * Expand an access string into multiple permission names,
- *   e.g: permission name 'contacts' with 'readwrite' =
- *   ['contacts-read', 'contacts-create', 'contacts-write']
- * @param string aPermName
- * @param string aAccess (optional)
- * @returns array containing expanded permission names.
- **/
-this.expandPermissions = function expandPermissions(aPermName, aAccess) {
-  if (!PermissionsTable[aPermName]) {
-    let errorMsg =
-      "PermissionsTable.jsm: expandPermissions: Unknown Permission: " + aPermName;
-    Cu.reportError(errorMsg);
-    dump(errorMsg);
-    return [];
-  }
-
-  const tableEntry = PermissionsTable[aPermName];
-
-  if (tableEntry.substitute && tableEntry.additional) {
-    let errorMsg =
-      "PermissionsTable.jsm: expandPermissions: Can't handle both 'substitute' " +
-      "and 'additional' entries for permission: " + aPermName;
-    Cu.reportError(errorMsg);
-    dump(errorMsg);
-    return [];
-  }
-
-  if (!aAccess && tableEntry.access ||
-      aAccess && !tableEntry.access) {
-    let errorMsg =
-      "PermissionsTable.jsm: expandPermissions: Invalid access for permission " +
-      aPermName + ": " + aAccess + "\n";
-    Cu.reportError(errorMsg);
-    dump(errorMsg);
-    return [];
-  }
-
-  let expandedPermNames = [];
-
-  if (tableEntry.access && aAccess) {
-    let requestedSuffixes = [];
-    switch (aAccess) {
-    case READONLY:
-      requestedSuffixes.push("read");
-      break;
-    case CREATEONLY:
-      requestedSuffixes.push("create");
-      break;
-    case READCREATE:
-      requestedSuffixes.push("read", "create");
-      break;
-    case READWRITE:
-      requestedSuffixes.push("read", "create", "write");
-      break;
-    default:
-      return [];
-    }
-
-    let permArr = appendAccessToPermName(aPermName, requestedSuffixes);
-
-    // Add the same suffix to each of the additions.
-    if (tableEntry.additional) {
-      for (let additional of tableEntry.additional) {
-        permArr = permArr.concat(appendAccessToPermName(additional, requestedSuffixes));
-      }
-    }
-
-    // Only add the suffixed version if the suffix exists in the table.
-    for (let idx in permArr) {
-      let suffix = requestedSuffixes[idx % requestedSuffixes.length];
-      if (tableEntry.access.indexOf(suffix) != -1) {
-        expandedPermNames.push(permArr[idx]);
-      }
-    }
-  } else if (tableEntry.substitute) {
-    expandedPermNames = expandedPermNames.concat(tableEntry.substitute);
-  } else {
-    expandedPermNames.push(aPermName);
-    // Include each of the additions exactly as they appear in the table.
-    if (tableEntry.additional) {
-      expandedPermNames = expandedPermNames.concat(tableEntry.additional);
-    }
-  }
-
-  return expandedPermNames;
-};
-
-this.PermissionsReverseTable = {};
-this.AllPossiblePermissions = [];
-
-(function () {
-  // PermissionsTable as it is works well for direct searches, but not
-  // so well for reverse ones (that is, if I get something like
-  // device-storage:music-read or indexedDB-chrome-settings-read how
-  // do I know which permission it really is? Hence this table is
-  // born. The idea is that
-  // reverseTable[device-storage:music-read] should return
-  // device-storage:music
-  //
-  // We also need a list of all the possible permissions for things like the
-  // settingsmanager, so construct that while we're at it.
-  for (let permName in PermissionsTable) {
-    let permAliases = [];
-    if (PermissionsTable[permName].access) {
-      permAliases = expandPermissions(permName, "readwrite");
-    } else if (!PermissionsTable[permName].substitute) {
-      permAliases = expandPermissions(permName);
-    }
-    for (let i = 0; i < permAliases.length; i++) {
-      PermissionsReverseTable[permAliases[i]] = permName;
-      AllPossiblePermissions.push(permAliases[i]);
-    }
-  }
-  AllPossiblePermissions =
-    AllPossiblePermissions.concat(["indexedDB", "offline-app", "pin-app"]);
-})();
-
-this.isExplicitInPermissionsTable = function(aPermName, aIntStatus) {
-
-  // Check to see if the 'webapp' is app/privileged/certified.
-  let appStatus;
-  switch (aIntStatus) {
-    case Ci.nsIPrincipal.APP_STATUS_CERTIFIED:
-      appStatus = "certified";
-      break;
-    case Ci.nsIPrincipal.APP_STATUS_PRIVILEGED:
-      appStatus = "privileged";
-      break;
-    default: // If it isn't certified or privileged, it's app
-      appStatus = "app";
-      break;
-  }
-
-  let realPerm = PermissionsReverseTable[aPermName];
-
-  if (realPerm) {
-    return (PermissionsTable[realPerm][appStatus] ==
-            Ci.nsIPermissionManager.PROMPT_ACTION);
-  } else {
-    return false;
-  }
-}
deleted file mode 100644
--- a/dom/apps/moz.build
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-EXTRA_JS_MODULES += [
-    'PermissionsTable.jsm',
-]
deleted file mode 100755
--- a/dom/apps/tests/create_test_receipts.py
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env python
-
-import jwt
-
-receipt1 = {
-  "typ": "purchase-receipt",
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314356"
-  },
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "iss": "http://mochi.test:8888",
-  "nbf": 131360185,
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt2 = {
-  "typ": "purchase-receipt",
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314357"
-  },
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "iss": "http://mochi.test:8888",
-  "nbf": 131360185,
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt_without_typ = {
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314358"
-  },
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "iss": "http://mochi.test:8888",
-  "nbf": 131360185,
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt_without_product = {
-  "typ": "purchase-receipt",
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "iss": "http://mochi.test:8888",
-  "nbf": 131360185,
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt_without_user = {
-  "typ": "purchase-receipt",
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314358"
-  },
-  "iss": "http://mochi.test:8888",
-  "nbf": 131360185,
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt_without_iss = {
-  "typ": "purchase-receipt",
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314358"
-  },
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "nbf": 131360185,
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt_without_nbf = {
-  "typ": "purchase-receipt",
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314358"
-  },
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "iss": "http://mochi.test:8888",
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt_without_iat = {
-  "typ": "purchase-receipt",
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314358"
-  },
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "iss": "http://mochi.test:8888",
-  "nbf": 131360185,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-receipt_with_wrong_typ = {
-  "typ": "fake",
-  "product": {
-    "url": "https://www.mozilla.org",
-    "storedata": "5169314358"
-  },
-  "user": {
-    "type": "directed-identifier",
-    "value": "4fb35151-2b9b-4ba2-8283-c49d381640bd"
-  },
-  "iss": "http://mochi.test:8888",
-  "nbf": 131360185,
-  "iat": 131360188,
-  "detail": "http://mochi.test:8888/receipt/5169314356",
-  "verify": "http://mochi.test:8888/verify/5169314356",
-  "reissue": "http://mochi.test:8888/reissue/5169314356"
-}
-
-print("let valid_receipt1 = \"" + jwt.encode(receipt1, "") + "\";\n")
-print("let valid_receipt2 = \"" + jwt.encode(receipt2, "") + "\";\n")
-print("let receipt_without_typ = \"" + jwt.encode(receipt_without_typ, "") + "\";\n")
-print("let receipt_without_product = \"" + jwt.encode(receipt_without_product, "") + "\";\n")
-print("let receipt_without_user = \"" + jwt.encode(receipt_without_user, "") + "\";\n")
-print("let receipt_without_iss = \"" + jwt.encode(receipt_without_iss, "") + "\";\n")
-print("let receipt_without_nbf = \"" + jwt.encode(receipt_without_nbf, "") + "\";\n")
-print("let receipt_without_iat = \"" + jwt.encode(receipt_without_iat, "") + "\";\n")
-print("let receipt_with_wrong_typ = \"" + jwt.encode(receipt_with_wrong_typ, "") + "\";\n")
deleted file mode 100644
--- a/dom/apps/tests/head.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function runAll(steps) {
-  SimpleTest.waitForExplicitFinish();
-
-  // Clone the array so we don't modify the original.
-  steps = steps.concat();
-  function next() {
-    if (steps.length) {
-      steps.shift()(next);
-    }
-    else {
-      SimpleTest.finish();
-    }
-  }
-  next();
-}
-
-function confirmNextPopup() {
-  var Ci = SpecialPowers.Ci;
-
-  var popupNotifications = SpecialPowers.wrap(window).top.
-                           QueryInterface(Ci.nsIInterfaceRequestor).
-                           getInterface(Ci.nsIWebNavigation).
-                           QueryInterface(Ci.nsIDocShell).
-                           chromeEventHandler.ownerDocument.defaultView.
-                           PopupNotifications;
-
-  var popupPanel = popupNotifications.panel;
-
-  function onPopupShown() {
-    popupPanel.removeEventListener("popupshown", onPopupShown, false);
-    SpecialPowers.wrap(this).childNodes[0].button.doCommand();
-    popupNotifications._dismiss();
-  }
-  popupPanel.addEventListener("popupshown", onPopupShown, false);
-}
-
-function promiseNoPopup() {
-  var Ci = SpecialPowers.Ci;
-
-  var popupNotifications = SpecialPowers.wrap(window).top.
-                           QueryInterface(Ci.nsIInterfaceRequestor).
-                           getInterface(Ci.nsIWebNavigation).
-                           QueryInterface(Ci.nsIDocShell).
-                           chromeEventHandler.ownerDocument.defaultView.
-                           PopupNotifications;
-
-  return new Promise((resolve) => {
-    var tries = 0;
-    var interval = setInterval(function() {
-      if (tries >= 30) {
-        ok(true, "The webapps-install notification didn't appear");
-        moveOn();
-      }
-
-      if (popupNotifications.getNotification("webapps-install")) {
-        ok(false, "Found the webapps-install notification");
-        moveOn();
-      }
-      tries++;
-    }, 100);
-
-    var moveOn = () => {
-      clearInterval(interval);
-      resolve();
-    };
-  });
-}
-
-// We need to mock the Alerts service, otherwise the alert that is shown
-// at the end of an installation makes the test leak the app's icon.
-
-const CID = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator).generateUUID();
-const ALERTS_SERVICE_CONTRACT_ID = "@mozilla.org/alerts-service;1";
-const ALERTS_SERVICE_CID = Components.ID(Cc[ALERTS_SERVICE_CONTRACT_ID].number);
-
-var AlertsService = {
-  classID: Components.ID(CID),
-
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory,
-                                         Ci.nsIAlertsService]),
-
-  createInstance: function(aOuter, aIID) {
-    if (aOuter) {
-      throw Cr.NS_ERROR_NO_AGGREGATION;
-    }
-
-    return this.QueryInterface(aIID);
-  },
-
-  init: function() {
-    Components.manager.nsIComponentRegistrar.registerFactory(this.classID,
-      "", ALERTS_SERVICE_CONTRACT_ID, this);
-  },
-
-  restore: function() {
-    Components.manager.nsIComponentRegistrar.registerFactory(ALERTS_SERVICE_CID,
-      "", ALERTS_SERVICE_CONTRACT_ID, null);
-  },
-
-  showAlert: function() {
-  },
-
-  showAlertNotification: function() {
-  },
-};
-
-AlertsService.init();
-
-SimpleTest.registerCleanupFunction(() => {
-  AlertsService.restore();
-});
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -31,17 +31,16 @@ interfaces = [
     'smil',
     'push',
 ]
 
 DIRS += ['interfaces/' + i for i in interfaces]
 
 DIRS += [
     'animation',
-    'apps',
     'base',
     'archivereader',
     'bindings',
     'battery',
     'browser-element',
     'cache',
     'canvas',
     'crypto',
--- a/dom/permission/moz.build
+++ b/dom/permission/moz.build
@@ -11,18 +11,13 @@ EXPORTS.mozilla.dom += [
 
 UNIFIED_SOURCES += [
     'PermissionObserver.cpp',
     'Permissions.cpp',
     'PermissionStatus.cpp',
     'PermissionUtils.cpp',
 ]
 
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
-
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 
-if CONFIG['MOZ_TIME_MANAGER']:
-    MOCHITEST_MANIFESTS += ['tests/mochitest-time.ini']
-
 FINAL_LIBRARY = 'xul'
 
 include('/ipc/chromium/chromium-config.mozbuild')
deleted file mode 100644
--- a/dom/permission/tests/file_framework.js
+++ /dev/null
@@ -1,224 +0,0 @@
-/** Test for Bug 815105 **/
-/*
- * gData is an array of object that tests using this framework must pass in
- * The current tests only pass in a single element array. Each test in
- * gData is executed by the framework for a given file
- *
- * Fields in gData object
- * perms   (required) Array of Strings
- *         list of permissions that this test will need. See
- *         http://dxr.mozilla.org/mozilla-central/source/dom/apps/src/PermissionsTable.jsm
- *         These permissions are added after a sanity check and removed at
- *         test conclusion
- *
- * obj     (required for default verifier) String
- *         The name of the window.navigator object used for accessing the
- *         WebAPI during the tests
- *
- * webidl  (required for default verifier) String
- * idl     (required for default verifier) String
- *         Only one of webidl / idl is required
- *         The IDL describing the navigator object. The returned object
- *         during tests /must/ be an instanceof this
- *
- * skip    (optional) Array of Strings
- *         A list of navigator.userAgent's to skip the second part of tests
- *         on. The tests still verify that you can't get obj on those
- *         platforms without permissions, however it is expected that adding
- *         the permission still won't allow access to those objects
- *
- * settings (optional) Array of preference tuples
- *         A list of settings that need to be set before this API is
- *         enabled. Note the settings are set before the sanity check is
- *         performed. If an API gates access only by preferences, then it
- *         will fail the initial test
- *
- * verifier (optional) Function
- *         A function used to test whether a WebAPI is accessible or not.
- *         The function takes a success and failure callback which both
- *         accept a msg argument. msg is surfaced up to the top level tests
- *         A default verifier is provided which only attempts to access
- *         the navigator object.
- *
- * needParentPerm (optional) Boolean
- *         Whether or not the parent frame requires these permissions as
- *         well. Otherwise the test process may be killed.
- */
-
-SimpleTest.waitForExplicitFinish();
-var expand = SpecialPowers.Cu.import("resource://gre/modules/PermissionsTable.jsm").expandPermissions;
-const permTable = SpecialPowers.Cu.import("resource://gre/modules/PermissionsTable.jsm").PermissionsTable;
-
-const TEST_DOMAIN = "http://example.org";
-const SHIM_PATH = "/tests/dom/permission/tests/file_shim.html"
-var gContent = document.getElementById('content');
-
-//var gData; defined in external files
-var gCurrentTest = 0;
-var gRemainingTests;
-var pendingTests = {};
-
-function PermTest(aData) {
-  var self = this;
-  var skip = aData.skip || false;
-  this.step = 0;
-  this.data = aData;
-  this.isSkip = skip &&
-                skip.some(function (el) {
-                          return navigator.
-                                 userAgent.toLowerCase().
-                                 indexOf(el.toLowerCase()) != -1;
-                        });
-
-  this.setupParent = false;
-  this.perms = expandPermissions(aData.perm);
-  this.id = gCurrentTest++;
-  this.iframe = null;
-
-  // keep a reference to this for eventhandler
-  pendingTests[this.id] = this;
-
-  this.createFrame = function() {
-    if (self.iframe) {
-      gContent.removeChild(self.iframe);
-    }
-    var iframe = document.createElement('iframe');
-    iframe.setAttribute('id', 'testframe' + self.step + self.perms)
-    iframe.setAttribute('remote', true);
-    iframe.src = TEST_DOMAIN + SHIM_PATH;
-    iframe.addEventListener('load', function _iframeLoad() {
-      iframe.removeEventListener('load', _iframeLoad);
-
-      // check permissions are correct
-      var allow = (self.step == 0 ? false : true);
-      self.perms.forEach(function (el) {
-        try {
-        var res = SpecialPowers.hasPermission(el, SpecialPowers.wrap(iframe)
-                                                  .contentDocument);
-        is(res, allow, (allow ? "Has " : "Doesn't have ") + el);
-        } catch(e) {
-          ok(false, "failed " + e);
-        }
-      });
-
-      var msg = {
-        id: self.id,
-        step: self.step++,
-        testdata: self.data,
-      }
-      // start the tests
-      iframe.contentWindow.postMessage(msg, "*");
-    });
-
-    self.iframe = iframe;
-    gContent.appendChild(iframe);
-  }
-
-  this.next = function () {
-    switch(self.step) {
-    case 0:
-      self.createFrame();
-    break;
-    case 1:
-      // add permissions
-      addPermissions(self.perms, SpecialPowers.
-                                 wrap(self.iframe).
-                                 contentDocument,
-                     self.createFrame.bind(self));
-    break;
-    case 2:
-      if (self.iframe) {
-        gContent.removeChild(self.iframe);
-      }
-      checkFinish();
-    break;
-    default:
-      ok(false, "Should not be reached");
-    break
-    }
-  }
-
-  this.start = function() {
-    // some permissions need parent to have permission as well
-    if (!self.setupParent && self.data.needParentPerm &&
-        !SpecialPowers.isMainProcess()) {
-      self.setupParent = true;
-      addPermissions(self.perms, window.document, self.start.bind(self));
-    } else if (self.data.settings && self.data.settings.length) {
-      SpecialPowers.pushPrefEnv({'set': self.data.settings.slice(0)},
-                                self.next.bind(self));
-    } else {
-      self.next();
-    }
-  }
-}
-
-function addPermissions(aPerms, aDoc, aCallback) {
-  var permList = [];
-  aPerms.forEach(function (el) {
-    var obj = {'type': el,
-               'allow': 1,
-               'context': aDoc};
-    permList.push(obj);
-  });
-  SpecialPowers.pushPermissions(permList, aCallback);
-}
-
-function expandPermissions(aPerms) {
-  var perms = [];
-  aPerms.forEach(function(el) {
-    var access = permTable[el].access ? "readwrite" : null;
-    var expanded = expand(el, access);
-    for (let i = 0; i < expanded.length; i++) {
-      perms.push(SpecialPowers.unwrap(expanded[i]));
-    }
-  });
-
-  return perms;
-}
-
-function msgHandler(evt) {
-  var data = evt.data;
-  var test = pendingTests[data.id];
-
-  /*
-   * step 2 of tests should fail on
-   * platforms which are skipped
-   */
-  if (test.isSkip && test.step == 2) {
-    todo(data.result, data.msg);
-  } else {
-    ok(data.result, data.msg);
-  }
-
-  if (test) {
-    test.next();
-  } else {
-    ok(false, "Received unknown id " + data.id);
-    checkFinish();
-  }
-}
-
-function checkFinish() {
-  if (--gRemainingTests) {
-    gTestRunner.next();
-  } else {
-    window.removeEventListener('message', msgHandler);
-    SimpleTest.finish();
-  }
-}
-
-function runTest() {
-  gRemainingTests = Object.keys(gData).length;
-
-  for (var test in gData) {
-    var test = new PermTest(gData[test]);
-    test.start();
-    yield undefined;
-  }
-}
-
-var gTestRunner = runTest();
-
-window.addEventListener('load', function() { gTestRunner.next(); }, false);
-window.addEventListener('message', msgHandler, false);
deleted file mode 100644
--- a/dom/permission/tests/file_shim.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<html>
-<head>
-<script type="application/javascript;version=1.8">
-function TestData(aOpts) {
-  for (var opt in aOpts) {
-    if (aOpts.hasOwnProperty(opt)) {
-      this[opt] = aOpts[opt];
-    }
-  }
-}
-
-TestData.prototype = {
-  getObj: function() {
-    if (!this.obj) {
-      return null;
-    }
-
-    // only one of the 2 should be set
-    if ((this.idl && this.webidl) ||
-        (!this.idl && !this.webidl)) {
-      return null;
-    }
-
-    // split on . to allow nested props
-    var props = this.obj.split(".");
-    var obj = window.navigator;
-
-    for (var i = 0; i < props.length && obj !== undefined; i++) {
-      obj = obj[props[i]];
-    }
-
-    if ((this.webidl && obj instanceof window[this.webidl]) ||
-        (this.idl && obj instanceof SpecialPowers.Ci[this.idl])) {
-      return obj;
-    } else {
-      return null;
-    }
-  },
-
-  // default verifier
-  verifier: function(success, failure) {
-    try {
-      if (this.getObj()) {
-        success(this.perm);
-      } else {
-        failure("Did not receive proper object");
-      }
-    } catch (e) {
-      failure("Received exception!: " + e);
-    }
-  },
-}
-
-function receiveMessage(e) {
-  var src = e.source;
-  var step = e.data.step;
-  var id = e.data.id;
-  var data = new TestData(e.data.testdata);
-  var success, failure;
-
-  function reply(res, msg) {
-    window.removeEventListener("message", receiveMessage, false);
-    src.postMessage({result: res, msg: msg,
-                     id: id}, "*");
-  }
-
-  function _success(msg) {
-    reply(true, msg);
-  }
-
-  function _failure(msg) {
-    reply(false, msg);
-  }
-
-  // flip success and failure around for precheck
-  if (step == 0) {
-    success = _failure;
-    failure = _success;
-  } else {
-    success = _success;
-    failure = _failure;
-  }
-
-  if (data.verifier instanceof Function) {
-    data.verifier(success, failure);
-  } else {
-    // import toSource() function to global
-    eval(data.verifier);
-    verifier.bind(data, success, failure)();
-  }
-}
-
-window.addEventListener("message", receiveMessage, false);
-</script>
-</head>
-<body>
-<div id="content" style="display: none"></div>
-</body>
-</html>
deleted file mode 100644
--- a/dom/permission/tests/mochitest-time.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[test_time.html]
--- a/dom/permission/tests/mochitest.ini
+++ b/dom/permission/tests/mochitest.ini
@@ -1,27 +1,5 @@
 [DEFAULT]
 support-files =
-  file_framework.js
-  file_shim.html
   file_empty.html
 
-[test_browser.html]
-skip-if = true
-[test_idle.html]
-# skip-if = (toolkit == 'gonk' && debug) #debug-only failure
-skip-if = true
 [test_permissions_api.html]
-[test_power.html]
-skip-if = true
-[test_presentation-device-manage.html]
-skip-if = true
-[test_systemXHR.html]
-[test_tcp-socket.html]
-skip-if = true
-[test_udp-socket.html]
-skip-if = true
-[test_keyboard.html]
-# skip-if = toolkit == 'android'
-skip-if = true
-[test_input-manage.html]
-# skip-if = toolkit == 'android'
-skip-if = true
deleted file mode 100644
--- a/dom/permission/tests/test_browser.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/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=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-function verifier(success, failure) {
-  var iframe = document.createElement('iframe');
-  iframe.setAttribute('mozbrowser', 'true');
-  iframe.src = "http://example.org/";
-  iframe.addEventListener('load', function() {
-    iframe.removeEventListener('load', arguments.callee);
-
-    if (iframe.getScreenshot && typeof iframe.getScreenshot == "function") {
-      success("Got mozbrowser");
-    } else {
-      failure("Didn't get mozbrowser") ;
-    }
-  });
-
-  document.getElementById('content').appendChild(iframe);
-}
-
-var gData = [
-  {
-    perm: ["browser"],
-    needParentPerm: true,
-    settings: [["dom.mozBrowserFramesEnabled", true],
-               ["network.disable.ipc.security", true]],
-    verifier: verifier.toSource(),
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_idle.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/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=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-function verifier(success, failure) {
-  try {
-    var obs = {
-      time: 1,
-      onidle: function() {
-        window.navigator.removeIdleObserver(obs);
-      },
-    }
-
-    // addIdleObserver throws if prinicpal doesn't have the permission
-    window.navigator.addIdleObserver(obs);
-    success("idle");
-  } catch (e) {
-    failure("Got an exception " + e);
-  }
-}
-
-var gData = [
-  {
-    perm: ["idle"],
-    verifier: verifier.toSource(),
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_input-manage.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=920977
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 920977 </title>
-  <script type="application/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=920977">Mozilla Bug 920977 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-function verifier(success, failure) {
-  try {
-    if (!this.getObj()) {
-      failure("Did not receive proper object");
-      return;
-    }
-  } catch (e) {
-    failure("Received exception!: " + e);
-    return;
-  }
-
-  try {
-    this.getObj().removeFocus();
-  } catch (e) {
-    failure("Received exception!: " + e);
-    return;
-  }
-
-  var iframe = document.createElement("iframe");
-  iframe.setAttribute("mozbrowser", true);
-  iframe.src = "http://example.org/";
-  iframe.addEventListener("load", function() {
-    iframe.removeEventListener("load", arguments.callee);
-    if (iframe.setInputMethodActive &&
-        typeof iframe.setInputMethodActive == "function") {
-      success("Got setInputMethodActive");
-    } else {
-      failure("Didn't get setInputMethodActive") ;
-    }
-  });
-
-  document.getElementById('content').appendChild(iframe);
-}
-
-var gData = [
-  {
-    perm: ["input-manage", "browser"],
-    needParentPerm: true,
-    obj: "mozInputMethod",
-    webidl: "MozInputMethod",
-    settings: [["dom.mozInputMethod.enabled", true],
-               ["dom.mozBrowserFramesEnabled", true],
-               ["network.disable.ipc.security", true]],
-    verifier: verifier.toSource()
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_keyboard.html
+++ /dev/null
@@ -1,51 +0,0 @@
--<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=920977
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 920977 </title>
-  <script type="application/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=920977">Mozilla Bug 920977 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-function verifier(success, failure) {
-  try {
-    if (!this.getObj()) {
-      failure("Did not receive proper object");
-      return;
-    }
-  } catch (e) {
-    failure("Received exception!: " + e);
-    return;
-  }
-
-  try {
-    this.getObj().removeFocus();
-    failure("Should receive exception when accessing system only method.!");
-  } catch (e) {
-    success(this.perm);
-  }
-}
-
-var gData = [
-  {
-    perm: ["input"],
-    obj: "mozInputMethod",
-    webidl: "MozInputMethod",
-    settings: [["dom.mozInputMethod.enabled", true]],
-    verifier: verifier.toSource()
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_networkstats-manage.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/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=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-var gData = [
-  {
-    perm: ["networkstats-manage"],
-    obj: "mozNetworkStats",
-    webidl: "MozNetworkStatsManager",
-    settings: [["dom.mozNetworkStats.enabled", true]],
-  },
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_power.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/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=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-var gData = [
-  {
-    perm: ["power"],
-    obj: "mozPower",
-    webidl: "MozPowerManager",
-  },
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_presentation-device-manage.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1080474
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for presentation-device-manage permission</title>
-  <script type="application/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=1080474">test presentation-device-manage</a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-function verifier(success, failure) {
-  if (window.navigator.mozPresentationDeviceInfo) {
-    success("Got mozPresentationDeviceInfo object!");
-  } else {
-    failure("Failed to get mozPresentationDeviceInfo object!");
-  }
-}
-var gData = [
-  {
-    perm: ["presentation-device-manage"],
-    settings: [["dom.presentation.enabled", true]],
-    obj: "mozPresentationDeviceInfo",
-    webidl: "PresentationDeviceInfoManager"
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_systemXHR.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/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=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-function verifier(success, failure) {
-  var xhr = new XMLHttpRequest({mozSystem: true});
-  if (xhr.mozSystem === true) {
-    success("systemXHR");
-  } else {
-    failure("Couldn't create systemXHR");
-  }
-}
-
-var gData = [
-  {
-    perm: ["systemXHR"],
-    verifier: verifier.toSource(),
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_tcp-socket.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/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=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-/* mozTCPSocket only returns null on window init
- * if the permission isn't set
- */
-function verifier(success, failure) {
-  try {
-    var conn = navigator.mozTCPSocket.open("http://mochi.test/", 80);
-
-    if (conn) {
-      if (conn instanceof window.TCPSocket) {
-        success("Opened connection");
-      } else {
-        failure("connection didn't match interface");
-      }
-    } else {
-      failure("failed to open connection");
-    }
-  } catch (e) {
-    failure("Got an exception " + e);
-  }
-}
-
-var gData = [
-  {
-    perm: ["tcp-socket"],
-    needParentPerm: true,
-    settings: [["dom.mozTCPSocket.enabled", true]],
-    verifier: verifier.toSource(),
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_time.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/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=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-var gData = [
-  {
-    perm: ["time"],
-    obj: "mozTime",
-    webidl: "MozTimeManager",
-  },
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/test_udp-socket.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=745283
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 745283 </title>
-  <script type="application/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=745283">Mozilla Bug 745283 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-function verifier(success, failure) {
-  try {
-    var socket = new UDPSocket();
-
-    if (socket) {
-      success("Opened socket");
-    } else {
-      failure("failed to open socket");
-    }
-  } catch (e) {
-    failure("Got an exception " + e);
-  }
-}
-
-var gData = [
-  {
-    perm: ["udp-socket"],
-    needParentPerm: true,
-    obj: "UDPSocket",
-    webidl: "UDPSocket",
-    settings: [["dom.udpsocket.enabled", true]],
-    verifier: verifier.toSource(),
-  }
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/permission/tests/unit/test_bug808734.js
+++ /dev/null
@@ -1,73 +0,0 @@
-var Cu = Components.utils;
-const READWRITE = "readwrite";
-const UNKNOWN = "foobar";
-
-var gData = [
-// test normal expansion
-{
-  permission: "contacts",
-  access: READWRITE,
-  expected: ["contacts-read", "contacts-create",
-             "contacts-write"]
-},
-// test additional expansion and access not having read+create+write
-{
-  permission: "settings",
-  access: READWRITE,
-  expected: ["settings-read", "settings-write",
-             "settings-api-read", "settings-api-write",
-             "indexedDB-chrome-settings-read",
-             "indexedDB-chrome-settings-write"]
-},
-// test unknown access
-{
-  permission: "contacts",
-  access: UNKNOWN,
-  expected: []
-},
-// test unknown permission
-{
-  permission: UNKNOWN,
-  access: READWRITE,
-  expected: []
-}
-];
-
-// check if 2 arrays contain the same elements
-function do_check_set_eq(a1, a2) {
-  do_check_eq(a1.length, a2.length)
-
-  Array.sort(a1);
-  Array.sort(a2);
-
-  for (let i = 0; i < a1.length; ++i) {
-    do_check_eq(a1[i], a2[i])
-  }
-}
-
-function test_substitute_does_not_break_substituted(scope) {
-  const Ci = Components.interfaces;
-
-  // geolocation-noprompt substitutes for geolocation ...
-  do_check_eq(scope.PermissionsTable["geolocation-noprompt"].substitute[0],
-              "geolocation");
-  // ... and sets silent allow ...
-  do_check_eq(scope.PermissionsTable["geolocation-noprompt"].certified,
-              Ci.nsIPermissionManager.ALLOW_ACTION)
-  // ... which works ...
-  do_check_false(scope.isExplicitInPermissionsTable("geolocation-noprompt", Ci.nsIPrincipal.APP_STATUS_CERTIFIED));
-  // ... but does not interfere with geolocation's PROMPT value
-  do_check_true(scope.isExplicitInPermissionsTable("geolocation", Ci.nsIPrincipal.APP_STATUS_CERTIFIED));
-}
-
-function run_test() {
-  var scope = {};
-  Cu.import("resource://gre/modules/PermissionsTable.jsm", scope);
-
-  for (var i = 0; i < gData.length; i++) {
-    var perms = scope.expandPermissions(gData[i].permission,
-                                        gData[i].access);
-    do_check_set_eq(perms, gData[i].expected);
-  }
-  test_substitute_does_not_break_substituted(scope);
-}
deleted file mode 100644
--- a/dom/permission/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-head =
-tail =
-
-[test_bug808734.js]
--- a/dom/settings/SettingsRequestManager.jsm
+++ b/dom/settings/SettingsRequestManager.jsm
@@ -11,17 +11,16 @@ const Cu = Components.utils;
 
 Cu.importGlobalProperties(['File']);
 
 this.EXPORTED_SYMBOLS = ["SettingsRequestManager"];
 
 Cu.import("resource://gre/modules/SettingsDB.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/PermissionsTable.jsm");
 
 var DEBUG = false;
 var VERBOSE = false;
 var TRACK = false;
 
 try {
   DEBUG   =
     Services.prefs.getBoolPref("dom.mozSettings.SettingsRequestManager.debug.enabled");
--- a/tools/lint/eslint/modules.json
+++ b/tools/lint/eslint/modules.json
@@ -162,17 +162,16 @@
   "OutputGenerator.jsm": ["UtteranceGenerator", "BrailleGenerator"],
   "PageMenu.jsm": ["PageMenuParent", "PageMenuChild"],
   "PageThumbs.jsm": ["PageThumbs", "PageThumbsStorage"],
   "Parser.jsm": ["Parser", "ParserHelpers", "SyntaxTreeVisitor"],
   "parsingTestHelpers.jsm": ["generateURIsFromDirTree"],
   "passwords.js": ["PasswordEngine", "LoginRec", "PasswordValidator"],
   "passwords.jsm": ["Password", "DumpPasswords"],
   "PdfJsNetwork.jsm": ["NetworkManager"],
-  "PermissionsTable.jsm": ["PermissionsTable", "PermissionsReverseTable", "expandPermissions", "appendAccessToPermName", "isExplicitInPermissionsTable", "AllPossiblePermissions"],
   "PhoneNumberMetaData.jsm": ["PHONE_NUMBER_META_DATA"],
   "PlacesUtils.jsm": ["PlacesUtils", "PlacesAggregatedTransaction", "PlacesCreateFolderTransaction", "PlacesCreateBookmarkTransaction", "PlacesCreateSeparatorTransaction", "PlacesCreateLivemarkTransaction", "PlacesMoveItemTransaction", "PlacesRemoveItemTransaction", "PlacesEditItemTitleTransaction", "PlacesEditBookmarkURITransaction", "PlacesSetItemAnnotationTransaction", "PlacesSetPageAnnotationTransaction", "PlacesEditBookmarkKeywordTransaction", "PlacesEditBookmarkPostDataTransaction", "PlacesEditItemDateAddedTransaction", "PlacesEditItemLastModifiedTransaction", "PlacesSortFolderByNameTransaction", "PlacesTagURITransaction", "PlacesUntagURITransaction"],
   "PluginProvider.jsm": [],
   "PointerAdapter.jsm": ["PointerRelay", "PointerAdapter"],
   "policies.js": ["ErrorHandler", "SyncScheduler"],
   "prefs.js": ["PrefsEngine", "PrefRec"],
   "prefs.jsm": ["Preference"],
   "PresentationDeviceInfoManager.jsm": ["PresentationDeviceInfoService"],