Bug 1036815 - Convert Advanced pane dialogs to be in-content. r=MattN
authorJoseph Yeh <jyeh@mozilla.com>
Wed, 17 Aug 2016 02:08:00 -0400
changeset 309875 20e45f63c2e60714b21feb188156348a01f5d8c6
parent 309874 a6f67ab4a4ec4dd66f53c4b4423e5b8b63023388
child 309876 7db43c31bdb7b4070e2e676022d39e81003c0d4f
push id20336
push userryanvm@gmail.com
push dateThu, 18 Aug 2016 13:35:55 +0000
treeherderfx-team@7db43c31bdb7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1036815
milestone51.0a1
Bug 1036815 - Convert Advanced pane dialogs to be in-content. r=MattN MozReview-Commit-ID: BXeCOryk4kE
browser/components/preferences/connection.xul
browser/components/preferences/in-content/advanced.js
browser/components/preferences/in-content/tests/browser_connection.js
browser/components/preferences/in-content/tests/browser_connection_bug388287.js
browser/components/preferences/in-content/tests/browser_proxy_backup.js
browser/components/preferences/jar.mn
browser/locales/en-US/chrome/browser/preferences/connection.dtd
--- a/browser/components/preferences/connection.xul
+++ b/browser/components/preferences/connection.xul
@@ -1,35 +1,30 @@
 <?xml version="1.0"?>
 
-# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-# 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/.
+<!-- 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 prefwindow SYSTEM "chrome://browser/locale/preferences/connection.dtd">
 
 <?xml-stylesheet href="chrome://global/skin/"?>
 
 <prefwindow id="ConnectionsDialog" type="child"
             xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
             title="&connectionsDialog.title;"
             dlgbuttons="accept,cancel,help"
             onbeforeaccept="return gConnectionsDialog.beforeAccept();"
             onload="gConnectionsDialog.checkForSystemProxy();"
-            ondialoghelp="openPrefsHelp()"
-#ifdef XP_MACOSX
-            style="width: &window.macWidth; !important;">
-#else
-            style="width: &window.width; !important;">
-#endif
+            ondialoghelp="openPrefsHelp()">
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
 
   <prefpane id="ConnectionsDialogPane"
+            class="largeDialogContainer"
             helpTopic="prefs-connection-settings">
 
     <preferences>
       <preference id="network.proxy.type"         name="network.proxy.type"         type="int" onchange="gConnectionsDialog.proxyTypeChanged();"/>
       <preference id="network.proxy.http"         name="network.proxy.http"         type="string"/>
       <preference id="network.proxy.http_port"    name="network.proxy.http_port"    type="int"/>
       <preference id="network.proxy.ftp"          name="network.proxy.ftp"          type="string"/>
       <preference id="network.proxy.ftp_port"     name="network.proxy.ftp_port"     type="int"/>
@@ -54,17 +49,17 @@
 
       <preference id="network.proxy.backup.ftp"          name="network.proxy.backup.ftp"          type="string"/>
       <preference id="network.proxy.backup.ftp_port"     name="network.proxy.backup.ftp_port"     type="int"/>
       <preference id="network.proxy.backup.ssl"          name="network.proxy.backup.ssl"          type="string"/>
       <preference id="network.proxy.backup.ssl_port"     name="network.proxy.backup.ssl_port"     type="int"/>
       <preference id="network.proxy.backup.socks"        name="network.proxy.backup.socks"        type="string"/>
       <preference id="network.proxy.backup.socks_port"   name="network.proxy.backup.socks_port"   type="int"/>
     </preferences>
-    
+
     <script type="application/javascript" src="chrome://browser/content/preferences/connection.js"/>
 
     <stringbundle id="preferencesBundle" src="chrome://browser/locale/preferences/preferences.properties"/>
 
     <groupbox>
       <caption label="&proxyTitle.label;"/>
 
       <radiogroup id="networkProxyType" preference="network.proxy.type"
@@ -151,24 +146,23 @@
           </rows>
         </grid>
         <radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/>
         <hbox class="indent" flex="1" align="center">
           <textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url"
                    oninput="gConnectionsDialog.updateReloadButton();"/>
           <button id="autoReload" icon="refresh"
                   label="&reload.label;" accesskey="&reload.accesskey;"
-                  oncommand="gConnectionsDialog.reloadPAC();" 
+                  oncommand="gConnectionsDialog.reloadPAC();"
                   preference="pref.advanced.proxies.disable_button.reload"/>
         </hbox>
       </radiogroup>
     </groupbox>
     <separator class="thin"/>
     <checkbox id="autologinProxy"
               label="&autologinproxy.label;"
               accesskey="&autologinproxy.accesskey;"
               preference="signon.autologin.proxy"
               tooltiptext="&autologinproxy.tooltip;"/>
     <checkbox id="networkProxySOCKSRemoteDNS"  preference="network.proxy.socks_remote_dns" label="&socksRemoteDNS.label2;" accesskey="&socksRemoteDNS.accesskey;" />
     <separator/>
   </prefpane>
 </prefwindow>
-
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -346,20 +346,17 @@ var gAdvancedPane = {
    * - Only used if browser.cache.disk.smart_size.enabled is disabled
    */
 
   /**
    * Displays a dialog in which proxy settings may be changed.
    */
   showConnections: function ()
   {
-    openDialog("chrome://browser/content/preferences/connection.xul",
-               "mozilla:connectionmanager",
-               "modal=yes",
-               null);
+    gSubDialog.open("chrome://browser/content/preferences/connection.xul");
   },
 
   // Retrieves the amount of space currently used by disk cache
   updateActualCacheSize: function ()
   {
     var actualSizeLabel = document.getElementById("actualDiskCacheSize");
     var prefStrBundle = document.getElementById("bundlePreferences");
 
@@ -501,20 +498,18 @@ var gAdvancedPane = {
     var params = { blockVisible     : false,
                    sessionVisible   : false,
                    allowVisible     : false,
                    prefilledHost    : "",
                    permissionType   : "offline-app",
                    manageCapability : Components.interfaces.nsIPermissionManager.DENY_ACTION,
                    windowTitle      : bundlePreferences.getString("offlinepermissionstitle"),
                    introText        : bundlePreferences.getString("offlinepermissionstext") };
-    openDialog("chrome://browser/content/preferences/permissions.xul",
-               "Browser:Permissions",
-               "modal=yes",
-               params);
+    gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
+                    null, params);
   },
 
   // XXX: duplicated in browser.js
   _getOfflineAppUsage(perm, groups) {
     let cacheService = Cc["@mozilla.org/network/application-cache-service;1"].
                        getService(Ci.nsIApplicationCacheService);
     if (!groups) {
       try {
@@ -778,19 +773,17 @@ var gAdvancedPane = {
                "modal=yes", null);
   },
 
   /**
    * Displays a dialog from which the user can manage his security devices.
    */
   showSecurityDevices: function ()
   {
-    openDialog("chrome://pippki/content/device_manager.xul",
-               "mozilla:devicemanager",
-               "modal=yes", null);
+    gSubDialog.open("chrome://pippki/content/device_manager.xul");
   },
 
   observe: function (aSubject, aTopic, aData) {
     if (AppConstants.MOZ_UPDATER) {
       switch (aTopic) {
         case "nsPref:changed":
           this.updateReadPrefs();
           break;
--- a/browser/components/preferences/in-content/tests/browser_connection.js
+++ b/browser/components/preferences/in-content/tests/browser_connection.js
@@ -1,75 +1,53 @@
 /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
 /* 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/. */
 
 Components.utils.import("resource://gre/modules/Services.jsm");
+Components.utils.import("resource://gre/modules/Task.jsm");
 
 function test() {
   waitForExplicitFinish();
 
   // network.proxy.type needs to be backed up and restored because mochitest
   // changes this setting from the default
   let oldNetworkProxyType = Services.prefs.getIntPref("network.proxy.type");
   registerCleanupFunction(function() {
     Services.prefs.setIntPref("network.proxy.type", oldNetworkProxyType);
     Services.prefs.clearUserPref("network.proxy.no_proxies_on");
     Services.prefs.clearUserPref("browser.preferences.instantApply");
   });
 
   let connectionURL = "chrome://browser/content/preferences/connection.xul";
-  let windowWatcher = Services.ww;
-
-  // instantApply must be true, otherwise connection dialog won't save
-  // when opened from in-content prefs
-  Services.prefs.setBoolPref("browser.preferences.instantApply", true);
-
-  // this observer is registered after the pref tab loads
-  let observer = {
-    observe: function(aSubject, aTopic, aData) {
-      if (aTopic == "domwindowopened") {
-        // when connection window loads, run tests and acceptDialog()
-        let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
-        win.addEventListener("load", function winLoadListener() {
-          win.removeEventListener("load", winLoadListener, false);
-          if (win.location.href == connectionURL) {
-            ok(true, "connection window opened");
-            runConnectionTests(win);
-            win.document.documentElement.acceptDialog();
-          }
-        }, false);
-      } else if (aTopic == "domwindowclosed") {
-        // finish up when connection window closes
-        let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
-        if (win.location.href == connectionURL) {
-          windowWatcher.unregisterNotification(observer);
-          ok(true, "connection window closed");
-          // runConnectionTests will have changed this pref - make sure it was
-          // sanitized correctly when the dialog was accepted
-          is(Services.prefs.getCharPref("network.proxy.no_proxies_on"),
-             ".a.com,.b.com,.c.com", "no_proxies_on pref has correct value");
-          gBrowser.removeCurrentTab();
-          finish();
-        }
-      }
-    }
-  };
 
   /*
   The connection dialog alone won't save onaccept since it uses type="child",
   so it has to be opened as a sub dialog of the main pref tab.
   Open the main tab here.
   */
-  open_preferences(function tabOpened(aContentWindow) {
+  open_preferences(Task.async(function* tabOpened(aContentWindow) {
     is(gBrowser.currentURI.spec, "about:preferences", "about:preferences loaded");
-    windowWatcher.registerNotification(observer);
-    gBrowser.contentWindow.gAdvancedPane.showConnections();
-  });
+    let dialog = yield openAndLoadSubDialog(connectionURL);
+    let dialogClosingPromise = waitForEvent(dialog.document.documentElement, "dialogclosing");
+
+    ok(dialog, "connection window opened");
+    runConnectionTests(dialog);
+    dialog.document.documentElement.acceptDialog();
+
+    let dialogClosingEvent = yield dialogClosingPromise;
+    ok(dialogClosingEvent, "connection window closed");
+    // runConnectionTests will have changed this pref - make sure it was
+    // sanitized correctly when the dialog was accepted
+    is(Services.prefs.getCharPref("network.proxy.no_proxies_on"),
+       ".a.com,.b.com,.c.com", "no_proxies_on pref has correct value");
+    gBrowser.removeCurrentTab();
+    finish();
+  }));
 }
 
 // run a bunch of tests on the window containing connection.xul
 function runConnectionTests(win) {
   let doc = win.document;
   let networkProxyNone = doc.getElementById("networkProxyNone");
   let networkProxyNonePref = doc.getElementById("network.proxy.no_proxies_on");
   let networkProxyTypePref = doc.getElementById("network.proxy.type");
--- a/browser/components/preferences/in-content/tests/browser_connection_bug388287.js
+++ b/browser/components/preferences/in-content/tests/browser_connection_bug388287.js
@@ -1,107 +1,74 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 Components.utils.import("resource://gre/modules/Services.jsm");
-
-// From browser/components/preferences/in-content/test/head.js
-function open_preferences(aCallback) {
-  gBrowser.selectedTab = gBrowser.addTab("about:preferences");
-  let newTabBrowser = gBrowser.getBrowserForTab(gBrowser.selectedTab);
-  newTabBrowser.addEventListener("Initialized", function () {
-    newTabBrowser.removeEventListener("Initialized", arguments.callee, true);
-    aCallback(gBrowser.contentWindow);
-  }, true);
-}
+Components.utils.import("resource://gre/modules/Task.jsm");
 
 function test() {
   waitForExplicitFinish();
-  let connectionTests = runConnectionTestsGen();
-  connectionTests.next();
   const connectionURL = "chrome://browser/content/preferences/connection.xul";
   let closeable = false;
   let finalTest = false;
-  let prefWin;
 
   // The changed preferences need to be backed up and restored because this mochitest
   // changes them setting from the default
   let oldNetworkProxyType = Services.prefs.getIntPref("network.proxy.type");
   registerCleanupFunction(function() {
     Services.prefs.setIntPref("network.proxy.type", oldNetworkProxyType);
     Services.prefs.clearUserPref("network.proxy.share_proxy_settings");
     for (let proxyType of ["http", "ssl", "ftp", "socks"]) {
       Services.prefs.clearUserPref("network.proxy." + proxyType);
       Services.prefs.clearUserPref("network.proxy." + proxyType + "_port");
       if (proxyType == "http") {
         continue;
       }
       Services.prefs.clearUserPref("network.proxy.backup." + proxyType);
       Services.prefs.clearUserPref("network.proxy.backup." + proxyType + "_port");
     }
-    try {
-      Services.ww.unregisterNotification(observer);
-    } catch (e) {
-      // Do nothing, if the test was successful the above line should fail silently.
-    }
   });
 
-  // this observer is registered after the pref tab loads
-  let observer = {
-    observe: function(aSubject, aTopic, aData) {
-      if (aTopic == "domwindowopened") {
-        // when the connection window loads, proceed forward in test
-        let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
-        win.addEventListener("load", function winLoadListener() {
-          win.removeEventListener("load", winLoadListener);
-          if (win.location.href == connectionURL) {
-            // If this is a connection window, run the next test
-            connectionTests.next(win);
-          }
-        });
-      } else if (aTopic == "domwindowclosed") {
-        // Check if the window should have closed, and respawn another window for further testing
-        let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
-        if (win.location.href == connectionURL) {
-          ok(closeable, "Connection dialog closed");
-
-          // Last close event, don't respawn, and clean up
-          if (finalTest) {
-            Services.ww.unregisterNotification(observer);
-            gBrowser.removeCurrentTab();
-            finish();
-            return;
-          }
-
-          // Open another connection pane for the next test
-          gBrowser.contentWindow.gAdvancedPane.showConnections();
-        }
-      }
-    }
-  };
-
-  // The actual tests to run, in a generator
-  function* runConnectionTestsGen() {
-    let doc, connectionWin, proxyTypePref, sharePref, httpPref, httpPortPref, ftpPref, ftpPortPref;
+  /*
+   The connection dialog alone won't save onaccept since it uses type="child",
+   so it has to be opened as a sub dialog of the main pref tab.
+   Open the main tab here.
+   */
+  open_preferences(Task.async(function* tabOpened(aContentWindow) {
+    let dialog, dialogClosingPromise;
+    let doc, proxyTypePref, sharePref, httpPref, httpPortPref, ftpPref, ftpPortPref;
 
     // Convenient function to reset the variables for the new window
-    function setDoc(win) {
-      doc = win.document;
-      connectionWin = win;
+    function* setDoc() {
+      if (closeable) {
+        let dialogClosingEvent = yield dialogClosingPromise;
+        ok(dialogClosingEvent, "Connection dialog closed");
+      }
+
+      if (finalTest) {
+        gBrowser.removeCurrentTab();
+        finish();
+        return;
+      }
+
+      dialog = yield openAndLoadSubDialog(connectionURL);
+      dialogClosingPromise = waitForEvent(dialog.document.documentElement, "dialogclosing");
+
+      doc = dialog.document;
       proxyTypePref = doc.getElementById("network.proxy.type");
       sharePref = doc.getElementById("network.proxy.share_proxy_settings");
       httpPref = doc.getElementById("network.proxy.http");
       httpPortPref = doc.getElementById("network.proxy.http_port");
       ftpPref = doc.getElementById("network.proxy.ftp");
       ftpPortPref = doc.getElementById("network.proxy.ftp_port");
     }
 
     // This batch of tests should not close the dialog
-    setDoc(yield null);
+    yield setDoc();
 
     // Testing HTTP port 0 with share on
     proxyTypePref.value = 1;
     sharePref.value = true;
     httpPref.value = "localhost";
     httpPortPref.value = 0;
     doc.documentElement.acceptDialog();
 
@@ -121,48 +88,38 @@ function test() {
     closeable = true;
 
     // Both ports 80, share on
     httpPortPref.value = 80;
     ftpPortPref.value = 80;
     doc.documentElement.acceptDialog();
 
     // HTTP 80, FTP 0, with share on
-    setDoc(yield null);
+    yield setDoc();
     proxyTypePref.value = 1;
     sharePref.value = true;
     ftpPref.value = "localhost";
     httpPref.value = "localhost";
     httpPortPref.value = 80;
     ftpPortPref.value = 0;
     doc.documentElement.acceptDialog();
 
     // HTTP host empty, port 0 with share on
-    setDoc(yield null);
+    yield setDoc();
     proxyTypePref.value = 1;
     sharePref.value = true;
     httpPref.value = "";
     httpPortPref.value = 0;
     doc.documentElement.acceptDialog();
 
     // HTTP 0, but in no proxy mode
-    setDoc(yield null);
+    yield setDoc();
     proxyTypePref.value = 0;
     sharePref.value = true;
     httpPref.value = "localhost";
     httpPortPref.value = 0;
 
     // This is the final test, don't spawn another connection window
     finalTest = true;
     doc.documentElement.acceptDialog();
-    yield null;
-  }
-
-  /*
-   The connection dialog alone won't save onaccept since it uses type="child",
-   so it has to be opened as a sub dialog of the main pref tab.
-   Open the main tab here.
-   */
-  open_preferences(function tabOpened(aContentWindow) {
-    Services.ww.registerNotification(observer);
-    gBrowser.contentWindow.gAdvancedPane.showConnections();
-  });
+    yield setDoc();
+  }));
 }
--- a/browser/components/preferences/in-content/tests/browser_proxy_backup.js
+++ b/browser/components/preferences/in-content/tests/browser_proxy_backup.js
@@ -1,14 +1,15 @@
 /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
 /* 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/. */
 
 Components.utils.import("resource://gre/modules/Services.jsm");
+Components.utils.import("resource://gre/modules/Task.jsm");
 
 function test() {
   waitForExplicitFinish();
 
   // network.proxy.type needs to be backed up and restored because mochitest
   // changes this setting from the default
   let oldNetworkProxyType = Services.prefs.getIntPref("network.proxy.type");
   registerCleanupFunction(function() {
@@ -22,67 +23,43 @@ function test() {
         continue;
       }
       Services.prefs.clearUserPref("network.proxy.backup." + proxyType);
       Services.prefs.clearUserPref("network.proxy.backup." + proxyType + "_port");
     }
   });
 
   let connectionURL = "chrome://browser/content/preferences/connection.xul";
-  let windowWatcher = Services.ww;
-
-  // instantApply must be true, otherwise connection dialog won't save
-  // when opened from in-content prefs
-  Services.prefs.setBoolPref("browser.preferences.instantApply", true);
 
   // Set a shared proxy and a SOCKS backup
   Services.prefs.setIntPref("network.proxy.type", 1);
   Services.prefs.setBoolPref("network.proxy.share_proxy_settings", true);
   Services.prefs.setCharPref("network.proxy.http", "example.com");
   Services.prefs.setIntPref("network.proxy.http_port", 1200);
   Services.prefs.setCharPref("network.proxy.socks", "example.com");
   Services.prefs.setIntPref("network.proxy.socks_port", 1200);
   Services.prefs.setCharPref("network.proxy.backup.socks", "127.0.0.1");
   Services.prefs.setIntPref("network.proxy.backup.socks_port", 9050);
 
-  // this observer is registered after the pref tab loads
-  let observer = {
-    observe: function(aSubject, aTopic, aData) {
-      if (aTopic == "domwindowopened") {
-        // when connection window loads, run tests and acceptDialog()
-        let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
-        win.addEventListener("load", function winLoadListener() {
-          win.removeEventListener("load", winLoadListener, false);
-          if (win.location.href == connectionURL) {
-            ok(true, "connection window opened");
-            win.document.documentElement.acceptDialog();
-          }
-        }, false);
-      } else if (aTopic == "domwindowclosed") {
-        // finish up when connection window closes
-        let win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
-        if (win.location.href == connectionURL) {
-          windowWatcher.unregisterNotification(observer);
-          ok(true, "connection window closed");
-
-          // The SOCKS backup should not be replaced by the shared value
-          is(Services.prefs.getCharPref("network.proxy.backup.socks"), "127.0.0.1", "Shared proxy backup shouldn't be replaced");
-          is(Services.prefs.getIntPref("network.proxy.backup.socks_port"), 9050, "Shared proxy port backup shouldn't be replaced");
-
-          gBrowser.removeCurrentTab();
-          finish();
-        }
-      }
-    }
-  };
-
   /*
   The connection dialog alone won't save onaccept since it uses type="child",
   so it has to be opened as a sub dialog of the main pref tab.
   Open the main tab here.
   */
-  open_preferences(function tabOpened(aContentWindow) {
+  open_preferences(Task.async(function* tabOpened(aContentWindow) {
     is(gBrowser.currentURI.spec, "about:preferences", "about:preferences loaded");
-    windowWatcher.registerNotification(observer);
-    gBrowser.contentWindow.gAdvancedPane.showConnections();
-  });
+    let dialog = yield openAndLoadSubDialog(connectionURL);
+    let dialogClosingPromise = waitForEvent(dialog.document.documentElement, "dialogclosing");
+
+    ok(dialog, "connection window opened");
+    dialog.document.documentElement.acceptDialog();
+
+    let dialogClosingEvent = yield dialogClosingPromise;
+    ok(dialogClosingEvent, "connection window closed");
+
+    // The SOCKS backup should not be replaced by the shared value
+    is(Services.prefs.getCharPref("network.proxy.backup.socks"), "127.0.0.1", "Shared proxy backup shouldn't be replaced");
+    is(Services.prefs.getIntPref("network.proxy.backup.socks_port"), 9050, "Shared proxy port backup shouldn't be replaced");
+
+    gBrowser.removeCurrentTab();
+    finish();
+  }));
 }
-
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
@@ -5,17 +5,17 @@
 browser.jar:
     content/browser/preferences/applicationManager.xul
     content/browser/preferences/applicationManager.js
     content/browser/preferences/blocklists.xul
     content/browser/preferences/blocklists.js
 *   content/browser/preferences/colors.xul
 *   content/browser/preferences/cookies.xul
     content/browser/preferences/cookies.js
-*   content/browser/preferences/connection.xul
+    content/browser/preferences/connection.xul
     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
--- a/browser/locales/en-US/chrome/browser/preferences/connection.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/connection.dtd
@@ -1,16 +1,14 @@
 <!-- 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/. -->
 
 
 <!ENTITY  connectionsDialog.title       "Connection Settings">
-<!ENTITY  window.width                  "37em">
-<!ENTITY  window.macWidth               "39em">
 
 <!ENTITY  proxyTitle.label              "Configure Proxies to Access the Internet">
 <!ENTITY  noProxyTypeRadio.label        "No proxy">
 <!ENTITY  noProxyTypeRadio.accesskey    "y">
 <!ENTITY  systemTypeRadio.label         "Use system proxy settings">
 <!ENTITY  systemTypeRadio.accesskey     "u">
 <!ENTITY  WPADTypeRadio.label           "Auto-detect proxy settings for this network">
 <!ENTITY  WPADTypeRadio.accesskey       "w">