Bug 1422397 - Rename browser/components/preferences/permissions.{xul,js} to exceptions.{xul,js}. r?johannh draft
authorPrathiksha <prathikshaprasadsuman@gmail.com>
Sat, 02 Dec 2017 14:13:56 +0530
changeset 706965 6346f1c12ad587aa47596d04797f368be6f8c933
parent 705036 3f6b9aaed8cd57954e0c960cde06d25228196456
child 742809 f536f484fa189bf28d648cede69ba91063029f18
push id91970
push userbmo:prathikshaprasadsuman@gmail.com
push dateMon, 04 Dec 2017 15:00:48 +0000
reviewersjohannh
bugs1422397
milestone59.0a1
Bug 1422397 - Rename browser/components/preferences/permissions.{xul,js} to exceptions.{xul,js}. r?johannh MozReview-Commit-ID: 7CTrg14K1Ai
browser/base/content/browser.js
browser/components/preferences/exceptions.js
browser/components/preferences/exceptions.xul
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js
browser/components/preferences/in-content/tests/browser_site_login_exceptions.js
browser/components/preferences/jar.mn
browser/components/preferences/permissions.js
browser/components/preferences/permissions.xul
toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -810,17 +810,17 @@ var gPopupBlockerObserver = {
                    permissionType: "popup",
                    windowTitle: bundlePreferences.getString("popuppermissionstitle2"),
                    introText: bundlePreferences.getString("popuppermissionstext") };
     var existingWindow = Services.wm.getMostRecentWindow("Browser:Permissions");
     if (existingWindow) {
       existingWindow.initWithParams(params);
       existingWindow.focus();
     } else
-      window.openDialog("chrome://browser/content/preferences/permissions.xul",
+      window.openDialog("chrome://browser/content/preferences/exceptions.xul",
                         "_blank", "resizable,dialog=no,centerscreen", params);
   },
 
   dontShowMessage() {
     var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
     gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
     gBrowser.getNotificationBox().removeCurrentNotification();
   }
rename from browser/components/preferences/permissions.js
rename to browser/components/preferences/exceptions.js
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/exceptions.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-// Imported via permissions.xul.
+// Imported via exceptions.xul.
 /* import-globals-from ../../../toolkit/content/treeUtils.js */
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/AppConstants.jsm");
 
 const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
 const nsICookiePermission = Components.interfaces.nsICookiePermission;
 
rename from browser/components/preferences/permissions.xul
rename to browser/components/preferences/exceptions.xul
--- a/browser/components/preferences/permissions.xul
+++ b/browser/components/preferences/exceptions.xul
@@ -15,17 +15,17 @@
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         style="width: &window.width;;"
         onload="gPermissionManager.onLoad();"
         onunload="gPermissionManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gPermissionManager.onWindowKeyPress(event);">
 
   <script src="chrome://global/content/treeUtils.js"/>
-  <script src="chrome://browser/content/preferences/permissions.js"/>
+  <script src="chrome://browser/content/preferences/exceptions.js"/>
 
   <stringbundle id="bundlePreferences"
                 src="chrome://browser/locale/preferences/preferences.properties"/>
 
   <keyset>
     <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -599,17 +599,17 @@ var gPrivacyPane = {
   showTrackingProtectionExceptions() {
     let bundlePreferences = document.getElementById("bundlePreferences");
     let params = {
       permissionType: "trackingprotection",
       hideStatusColumn: true,
       windowTitle: bundlePreferences.getString("trackingprotectionpermissionstitle"),
       introText: bundlePreferences.getString("trackingprotectionpermissionstext2"),
     };
-    gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
+    gSubDialog.open("chrome://browser/content/preferences/exceptions.xul",
       null, params);
   },
 
   /**
    * Displays the available block lists for tracking protection.
    */
   showBlockLists() {
     var bundlePreferences = document.getElementById("bundlePreferences");
@@ -740,17 +740,17 @@ var gPrivacyPane = {
       blockVisible: true,
       sessionVisible: true,
       allowVisible: true,
       prefilledHost: "",
       permissionType: "cookie",
       windowTitle: bundlePreferences.getString("cookiepermissionstitle"),
       introText: bundlePreferences.getString("cookiepermissionstext")
     };
-    gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
+    gSubDialog.open("chrome://browser/content/preferences/exceptions.xul",
       null, params);
   },
 
   /**
    * Displays all the user's cookies in a dialog.
    */
   showCookies(aCategory) {
     gSubDialog.open("chrome://browser/content/preferences/cookies.xul");
@@ -891,17 +891,17 @@ var gPrivacyPane = {
     var bundlePreferences = document.getElementById("bundlePreferences");
     var params = {
       blockVisible: false, sessionVisible: false, allowVisible: true,
       prefilledHost: "", permissionType: "popup"
     };
     params.windowTitle = bundlePreferences.getString("popuppermissionstitle2");
     params.introText = bundlePreferences.getString("popuppermissionstext");
 
-    gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
+    gSubDialog.open("chrome://browser/content/preferences/exceptions.xul",
       "resizable=yes", params);
   },
 
   // UTILITY FUNCTIONS
 
   /**
    * Utility function to enable/disable the button specified by aButtonID based
    * on the value of the Boolean preference specified by aPreferenceID.
@@ -936,17 +936,17 @@ var gPrivacyPane = {
       allowVisible: false,
       hideStatusColumn: true,
       prefilledHost: "",
       permissionType: "login-saving",
       windowTitle: bundlePrefs.getString("savedLoginsExceptions_title"),
       introText: bundlePrefs.getString("savedLoginsExceptions_desc3")
     };
 
-    gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
+    gSubDialog.open("chrome://browser/content/preferences/exceptions.xul",
       null, params);
   },
 
   /**
    * Initializes master password UI: the "use master password" checkbox, selects
    * the master password button to show, and enables/disables it as necessary.
    * The master password is controlled by various bits of NSS functionality, so
    * the UI for it can't be controlled by the normal preference bindings.
@@ -1157,17 +1157,17 @@ var gPrivacyPane = {
     var bundlePrefs = document.getElementById("bundlePreferences");
 
     var params = this._addonParams;
     if (!params.windowTitle || !params.introText) {
       params.windowTitle = bundlePrefs.getString("addons_permissions_title2");
       params.introText = bundlePrefs.getString("addonspermissionstext");
     }
 
-    gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
+    gSubDialog.open("chrome://browser/content/preferences/exceptions.xul",
       null, params);
   },
 
   /**
    * Parameters for the add-on install permissions dialog.
    */
   _addonParams:
   {
--- a/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
+++ b/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
@@ -330,17 +330,17 @@ var testRunner = {
       openPreferencesViaOpenPreferencesAPI("panePrivacy", {leaveOpen: true}).then(function() {
         // eslint-disable-next-line mozilla/no-cpows-in-tests
         let doc = gBrowser.contentDocument;
         let historyMode = doc.getElementById("historyMode");
         historyMode.value = "custom";
         historyMode.doCommand();
 
         let promiseSubDialogLoaded =
-          promiseLoadSubDialog("chrome://browser/content/preferences/permissions.xul");
+          promiseLoadSubDialog("chrome://browser/content/preferences/exceptions.xul");
         doc.getElementById("cookieExceptions").doCommand();
 
         promiseSubDialogLoaded.then(function(win) {
           helperFunctions.windowLoad(win);
         });
       });
     });
   },
--- a/browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js
+++ b/browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js
@@ -1,11 +1,11 @@
 "use strict";
 
-const PERMISSIONS_URL = "chrome://browser/content/preferences/permissions.xul";
+const PERMISSIONS_URL = "chrome://browser/content/preferences/exceptions.xul";
 
 add_task(async function urlFieldVisibleForPopupPermissions(finish) {
   await openPreferencesViaOpenPreferencesAPI("panePrivacy", {leaveOpen: true});
   // eslint-disable-next-line mozilla/no-cpows-in-tests
   let win = gBrowser.selectedBrowser.contentWindow;
   let doc = win.document;
   let popupPolicyCheckbox = doc.getElementById("popupPolicy");
   ok(!popupPolicyCheckbox.checked, "popupPolicyCheckbox should be unchecked by default");
--- a/browser/components/preferences/in-content/tests/browser_site_login_exceptions.js
+++ b/browser/components/preferences/in-content/tests/browser_site_login_exceptions.js
@@ -1,10 +1,10 @@
 "use strict";
-const PERMISSIONS_URL = "chrome://browser/content/preferences/permissions.xul";
+const PERMISSIONS_URL = "chrome://browser/content/preferences/exceptions.xul";
 
 var exceptionsDialog;
 
 add_task(async function openLoginExceptionsSubDialog() {
   // Undo the save password change.
   registerCleanupFunction(async function() {
     await ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
       let doc = content.document;
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
@@ -14,23 +14,23 @@ browser.jar:
     content/browser/preferences/connection.js
     content/browser/preferences/donottrack.xul
 *   content/browser/preferences/fonts.xul
     content/browser/preferences/fonts.js
     content/browser/preferences/handlers.xml
     content/browser/preferences/handlers.css
 *   content/browser/preferences/languages.xul
     content/browser/preferences/languages.js
-    content/browser/preferences/permissions.xul
+    content/browser/preferences/exceptions.xul
+    content/browser/preferences/exceptions.js
     content/browser/preferences/sitePermissions.xul
     content/browser/preferences/sitePermissions.js
     content/browser/preferences/sitePermissions.css
     content/browser/preferences/containers.xul
     content/browser/preferences/containers.js
-    content/browser/preferences/permissions.js
     content/browser/preferences/sanitize.xul
     content/browser/preferences/sanitize.js
     content/browser/preferences/selectBookmark.xul
     content/browser/preferences/selectBookmark.js
     content/browser/preferences/siteDataSettings.xul
     content/browser/preferences/siteDataSettings.js
     content/browser/preferences/siteDataSettings.css
 *   content/browser/preferences/siteDataRemoveSelected.xul
--- a/toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
@@ -1,16 +1,16 @@
 
 "use strict";
 
 const LOGIN_HOST = "http://example.com";
 
 function openExceptionsDialog() {
   return window.openDialog(
-    "chrome://browser/content/preferences/permissions.xul",
+    "chrome://browser/content/preferences/exceptions.xul",
     "Toolkit:PasswordManagerExceptions", "",
     {
       blockVisible: true,
       sessionVisible: false,
       allowVisible: false,
       hideStatusColumn: true,
       prefilledHost: "",
       permissionType: "login-saving"