Bug 1368943 - Disable content process count UI and switch description for non-e10s users, r=jaws draft
authorTimothy Guan-tin Chien <timdream@gmail.com>
Fri, 09 Jun 2017 11:44:16 +0800
changeset 592120 ba90d7a1dba4b1adc28e7449e99510dbb80a813c
parent 590795 7efda263a842e60cd0cc00b3c4a7058c65590702
child 632720 5497c618471436b62412fdfa9cce49d742202e3d
push id63279
push usertimdream@gmail.com
push dateSat, 10 Jun 2017 14:24:30 +0000
reviewersjaws
bugs1368943
milestone55.0a1
Bug 1368943 - Disable content process count UI and switch description for non-e10s users, r=jaws MozReview-Commit-ID: 7UNKrz8VMzI
browser/components/preferences/in-content-new/main.js
browser/components/preferences/in-content-new/main.xul
browser/components/preferences/in-content-new/tests/browser.ini
browser/components/preferences/in-content-new/tests/browser_performance.js
browser/components/preferences/in-content-new/tests/browser_performance_non_e10s.js
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/main.xul
browser/components/preferences/in-content/tests/browser.ini
browser/components/preferences/in-content/tests/browser_performance.js
browser/components/preferences/in-content/tests/browser_performance_non_e10s.js
browser/locales/en-US/chrome/browser/preferences-old/advanced.dtd
browser/locales/en-US/chrome/browser/preferences/advanced.dtd
--- a/browser/components/preferences/in-content-new/main.js
+++ b/browser/components/preferences/in-content-new/main.js
@@ -213,16 +213,31 @@ var gMainPane = {
     }
 
     // Notify observers that the UI is now ready
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
               .notifyObservers(window, "main-pane-loaded");
   },
 
+  isE10SEnabled() {
+    let e10sEnabled;
+    try {
+      let e10sStatus = Components.classes["@mozilla.org/supports-PRUint64;1"]
+                         .createInstance(Ci.nsISupportsPRUint64);
+      let appinfo = Services.appinfo.QueryInterface(Ci.nsIObserver);
+      appinfo.observe(e10sStatus, "getE10SBlocked", "");
+      e10sEnabled = e10sStatus.data < 2;
+    } catch (e) {
+      e10sEnabled = false;
+    }
+
+    return e10sEnabled;
+  },
+
   enableE10SChange() {
     if (AppConstants.E10S_TESTING_ONLY) {
       let e10sCheckbox = document.getElementById("e10sAutoStart");
       let e10sPref = document.getElementById("browser.tabs.remote.autostart");
       let e10sTempPref = document.getElementById("e10sTempPref");
 
       let prefsToChange;
       if (e10sCheckbox.checked) {
@@ -820,24 +835,36 @@ var gMainPane = {
       accelerationPref.value = accelerationPref.defaultValue;
       performanceSettings.hidden = true;
     } else {
       performanceSettings.hidden = false;
     }
   },
 
   buildContentProcessCountMenuList() {
-    let processCountPref = document.getElementById("dom.ipc.processCount");
-    let bundlePreferences = document.getElementById("bundlePreferences");
-    let label = bundlePreferences.getFormattedString("defaultContentProcessCount",
-      [processCountPref.defaultValue]);
-    let contentProcessCount =
-      document.querySelector(`#contentProcessCount > menupopup >
-                              menuitem[value="${processCountPref.defaultValue}"]`);
-    contentProcessCount.label = label;
+    if (gMainPane.isE10SEnabled()) {
+      let processCountPref = document.getElementById("dom.ipc.processCount");
+      let bundlePreferences = document.getElementById("bundlePreferences");
+      let label = bundlePreferences.getFormattedString("defaultContentProcessCount",
+        [processCountPref.defaultValue]);
+      let contentProcessCount =
+        document.querySelector(`#contentProcessCount > menupopup >
+                                menuitem[value="${processCountPref.defaultValue}"]`);
+      contentProcessCount.label = label;
+
+      document.getElementById("limitContentProcess").disabled = false;
+      document.getElementById("contentProcessCount").disabled = false;
+      document.getElementById("contentProcessCountEnabledDescription").hidden = false;
+      document.getElementById("contentProcessCountDisabledDescription").hidden = true;
+    } else {
+      document.getElementById("limitContentProcess").disabled = true;
+      document.getElementById("contentProcessCount").disabled = true;
+      document.getElementById("contentProcessCountEnabledDescription").hidden = true;
+      document.getElementById("contentProcessCountDisabledDescription").hidden = false;
+    }
   },
 
   buildDefaultEngineDropDown() {
     // This is called each time something affects the list of engines.
     let list = document.getElementById("defaultEngine");
     // Set selection to the current default engine.
     let currentEngine = Services.search.currentEngine.name;
 
--- a/browser/components/preferences/in-content-new/main.xul
+++ b/browser/components/preferences/in-content-new/main.xul
@@ -653,11 +653,12 @@
           <menuitem label="3" value="3"/>
           <menuitem label="4" value="4"/>
           <menuitem label="5" value="5"/>
           <menuitem label="6" value="6"/>
           <menuitem label="7" value="7"/>
         </menupopup>
       </menulist>
     </hbox>
-    <description>&limitContentProcessOption.description;</description>
+    <description id="contentProcessCountEnabledDescription">&limitContentProcessOption.description;</description>
+    <description id="contentProcessCountDisabledDescription">&limitContentProcessOption.disabledDescription;<label class="text-link" href="https://wiki.mozilla.org/Electrolysis">&limitContentProcessOption.disabledDescriptionLink;</label></description>
   </vbox>
 </groupbox>
--- a/browser/components/preferences/in-content-new/tests/browser.ini
+++ b/browser/components/preferences/in-content-new/tests/browser.ini
@@ -34,16 +34,19 @@ skip-if = os != "win" # This test tests 
 [browser_defaultbrowser_alwayscheck.js]
 [browser_healthreport.js]
 skip-if = true || !healthreport # Bug 1185403 for the "true"
 [browser_homepages_filter_aboutpreferences.js]
 [browser_layersacceleration.js]
 [browser_masterpassword.js]
 [browser_notifications_do_not_disturb.js]
 [browser_performance.js]
+skip-if = !e10s
+[browser_performance_non_e10s.js]
+skip-if = e10s
 [browser_permissions_urlFieldHidden.js]
 [browser_proxy_backup.js]
 [browser_privacypane_1.js]
 [browser_privacypane_3.js]
 [browser_privacypane_4.js]
 [browser_privacypane_5.js]
 [browser_privacypane_8.js]
 [browser_sanitizeOnShutdown_prefLocked.js]
--- a/browser/components/preferences/in-content-new/tests/browser_performance.js
+++ b/browser/components/preferences/in-content-new/tests/browser_performance.js
@@ -31,19 +31,26 @@ add_task(async function() {
 
   let allowHWAccel = doc.querySelector("#allowHWAccel");
   let allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, DEFAULT_HW_ACCEL_PREF,
     "pref value should be the default value before clicking on checkbox");
   is(allowHWAccel.checked, !DEFAULT_HW_ACCEL_PREF, "checkbox should show the invert of the default value");
 
   let contentProcessCount = doc.querySelector("#contentProcessCount");
+  is(contentProcessCount.disabled, false, "process count control should be enabled");
   is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT, "default pref value should be default value");
   is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be the default one");
 
+  let contentProcessCountEnabledDescription = doc.querySelector("#contentProcessCountEnabledDescription");
+  is(contentProcessCountEnabledDescription.hidden, false, "process count enabled description should be shown");
+
+  let contentProcessCountDisabledDescription = doc.querySelector("#contentProcessCountDisabledDescription");
+  is(contentProcessCountDisabledDescription.hidden, true, "process count enabled description should be hidden");
+
   allowHWAccel.click();
   allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, !DEFAULT_HW_ACCEL_PREF,
     "pref value should be opposite of the default value after clicking on checkbox");
   is(allowHWAccel.checked, !allowHWAccelPref, "checkbox should show the invert of the current value");
 
   contentProcessCount.value = 7;
   contentProcessCount.doCommand();
copy from browser/components/preferences/in-content-new/tests/browser_performance.js
copy to browser/components/preferences/in-content-new/tests/browser_performance_non_e10s.js
--- a/browser/components/preferences/in-content-new/tests/browser_performance.js
+++ b/browser/components/preferences/in-content-new/tests/browser_performance_non_e10s.js
@@ -31,109 +31,60 @@ add_task(async function() {
 
   let allowHWAccel = doc.querySelector("#allowHWAccel");
   let allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, DEFAULT_HW_ACCEL_PREF,
     "pref value should be the default value before clicking on checkbox");
   is(allowHWAccel.checked, !DEFAULT_HW_ACCEL_PREF, "checkbox should show the invert of the default value");
 
   let contentProcessCount = doc.querySelector("#contentProcessCount");
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT, "default pref value should be default value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be the default one");
+  is(contentProcessCount.disabled, true, "process count control should be disabled");
+
+  let contentProcessCountEnabledDescription = doc.querySelector("#contentProcessCountEnabledDescription");
+  is(contentProcessCountEnabledDescription.hidden, true, "process count enabled description should be hidden");
+
+  let contentProcessCountDisabledDescription = doc.querySelector("#contentProcessCountDisabledDescription");
+  is(contentProcessCountDisabledDescription.hidden, false, "process count enabled description should be shown");
 
   allowHWAccel.click();
   allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, !DEFAULT_HW_ACCEL_PREF,
     "pref value should be opposite of the default value after clicking on checkbox");
   is(allowHWAccel.checked, !allowHWAccelPref, "checkbox should show the invert of the current value");
 
-  contentProcessCount.value = 7;
-  contentProcessCount.doCommand();
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), 7, "pref value should be 7");
-  is(contentProcessCount.selectedItem.value, 7, "selected item should be 7");
-
   allowHWAccel.click();
   allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, DEFAULT_HW_ACCEL_PREF,
     "pref value should be the default value after clicking on checkbox");
   is(allowHWAccel.checked, !allowHWAccelPref, "checkbox should show the invert of the current value");
 
-  contentProcessCount.value = DEFAULT_PROCESS_COUNT;
-  contentProcessCount.doCommand();
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT, "pref value should be default value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be default one");
-
   is(performanceSettings.hidden, false, "performance settings section should be still shown");
 
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
   await BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(async function() {
   let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
   is(prefs.selectedPane, "paneGeneral", "General pane was selected");
 
   let doc = gBrowser.contentDocument;
-  let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
-  let allowHWAccel = doc.querySelector("#allowHWAccel");
-  let contentProcessCount = doc.querySelector("#contentProcessCount");
-  let performanceSettings = doc.querySelector("#performanceSettings");
-
-  useRecommendedPerformanceSettings.click();
-  allowHWAccel.click();
-  contentProcessCount.value = 7;
-  contentProcessCount.doCommand();
-  useRecommendedPerformanceSettings.click();
-
-  is(Services.prefs.getBoolPref("browser.preferences.defaultPerformanceSettings.enabled"), true,
-    "pref value should be true before clicking on checkbox");
-  ok(useRecommendedPerformanceSettings.checked, "checkbox should be checked before clicking on checkbox");
-  is(performanceSettings.hidden, true, "performance settings section should be still shown");
-
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-add_task(async function() {
-  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.contentDocument;
   let performanceSettings = doc.querySelector("#performanceSettings");
 
   is(performanceSettings.hidden, true, "performance settings section should not be shown");
 
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);
 
   is(performanceSettings.hidden, false, "performance settings section should be shown");
 
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
   await BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(async function() {
-  Services.prefs.setIntPref("dom.ipc.processCount", 7);
-
-  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.contentDocument;
-
-  let performanceSettings = doc.querySelector("#performanceSettings");
-  is(performanceSettings.hidden, false, "performance settings section should be shown");
-
-  let contentProcessCount = doc.querySelector("#contentProcessCount");
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), 7, "pref value should be 7");
-  is(contentProcessCount.selectedItem.value, 7, "selected item should be 7");
-
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-add_task(async function() {
   Services.prefs.setBoolPref("layers.acceleration.disabled", true);
 
   let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
   is(prefs.selectedPane, "paneGeneral", "General pane was selected");
 
   let doc = gBrowser.contentDocument;
 
   let performanceSettings = doc.querySelector("#performanceSettings");
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -138,16 +138,31 @@ var gMainPane = {
     }
 
     // Notify observers that the UI is now ready
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
               .notifyObservers(window, "main-pane-loaded");
   },
 
+  isE10SEnabled() {
+    let e10sEnabled;
+    try {
+      let e10sStatus = Components.classes["@mozilla.org/supports-PRUint64;1"]
+                         .createInstance(Ci.nsISupportsPRUint64);
+      let appinfo = Services.appinfo.QueryInterface(Ci.nsIObserver);
+      appinfo.observe(e10sStatus, "getE10SBlocked", "");
+      e10sEnabled = e10sStatus.data < 2;
+    } catch (e) {
+      e10sEnabled = false;
+    }
+
+    return e10sEnabled;
+  },
+
   enableE10SChange() {
     if (AppConstants.E10S_TESTING_ONLY) {
       let e10sCheckbox = document.getElementById("e10sAutoStart");
       let e10sPref = document.getElementById("browser.tabs.remote.autostart");
       let e10sTempPref = document.getElementById("e10sTempPref");
 
       let prefsToChange;
       if (e10sCheckbox.checked) {
@@ -421,24 +436,36 @@ var gMainPane = {
       accelerationPref.value = accelerationPref.defaultValue;
       performanceSettings.hidden = true;
     } else {
       performanceSettings.hidden = false;
     }
   },
 
   buildContentProcessCountMenuList() {
-    let processCountPref = document.getElementById("dom.ipc.processCount");
-    let bundlePreferences = document.getElementById("bundlePreferences");
-    let label = bundlePreferences.getFormattedString("defaultContentProcessCount",
-      [processCountPref.defaultValue]);
-    let contentProcessCount =
-      document.querySelector(`#contentProcessCount > menupopup >
-                              menuitem[value="${processCountPref.defaultValue}"]`);
-    contentProcessCount.label = label;
+    if (gMainPane.isE10SEnabled()) {
+      let processCountPref = document.getElementById("dom.ipc.processCount");
+      let bundlePreferences = document.getElementById("bundlePreferences");
+      let label = bundlePreferences.getFormattedString("defaultContentProcessCount",
+        [processCountPref.defaultValue]);
+      let contentProcessCount =
+        document.querySelector(`#contentProcessCount > menupopup >
+                                menuitem[value="${processCountPref.defaultValue}"]`);
+      contentProcessCount.label = label;
+
+      document.getElementById("limitContentProcess").disabled = false;
+      document.getElementById("contentProcessCount").disabled = false;
+      document.getElementById("contentProcessCountEnabledDescription").hidden = false;
+      document.getElementById("contentProcessCountDisabledDescription").hidden = true;
+    } else {
+      document.getElementById("limitContentProcess").disabled = true;
+      document.getElementById("contentProcessCount").disabled = true;
+      document.getElementById("contentProcessCountEnabledDescription").hidden = true;
+      document.getElementById("contentProcessCountDisabledDescription").hidden = false;
+    }
   },
 
   // DOWNLOADS
 
   /*
    * Preferences:
    *
    * browser.download.useDownloadDir - bool
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -345,11 +345,12 @@
           <menuitem label="3" value="3"/>
           <menuitem label="4" value="4"/>
           <menuitem label="5" value="5"/>
           <menuitem label="6" value="6"/>
           <menuitem label="7" value="7"/>
         </menupopup>
       </menulist>
     </hbox>
-    <description>&limitContentProcessOption.description;</description>
+    <description id="contentProcessCountEnabledDescription">&limitContentProcessOption.description;</description>
+    <description id="contentProcessCountDisabledDescription">&limitContentProcessOption.disabledDescription;<label class="text-link" href="https://wiki.mozilla.org/Electrolysis">&limitContentProcessOption.disabledDescriptionLink;</label></description>
   </vbox>
 </groupbox>
--- a/browser/components/preferences/in-content/tests/browser.ini
+++ b/browser/components/preferences/in-content/tests/browser.ini
@@ -26,16 +26,19 @@ skip-if = os != "win" # This test tests 
 [browser_connection_bug388287.js]
 [browser_cookies_exceptions.js]
 [browser_defaultbrowser_alwayscheck.js]
 [browser_healthreport.js]
 skip-if = true || !healthreport # Bug 1185403 for the "true"
 [browser_homepages_filter_aboutpreferences.js]
 [browser_notifications_do_not_disturb.js]
 [browser_performance.js]
+skip-if = !e10s
+[browser_performance_non_e10s.js]
+skip-if = e10s
 [browser_permissions_urlFieldHidden.js]
 [browser_proxy_backup.js]
 [browser_privacypane_1.js]
 [browser_privacypane_3.js]
 [browser_privacypane_4.js]
 [browser_privacypane_5.js]
 [browser_privacypane_8.js]
 [browser_sanitizeOnShutdown_prefLocked.js]
--- a/browser/components/preferences/in-content/tests/browser_performance.js
+++ b/browser/components/preferences/in-content/tests/browser_performance.js
@@ -31,19 +31,26 @@ add_task(function*() {
 
   let allowHWAccel = doc.querySelector("#allowHWAccel");
   let allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, DEFAULT_HW_ACCEL_PREF,
     "pref value should be the default value before clicking on checkbox");
   is(allowHWAccel.checked, !DEFAULT_HW_ACCEL_PREF, "checkbox should show the invert of the default value");
 
   let contentProcessCount = doc.querySelector("#contentProcessCount");
+  is(contentProcessCount.disabled, false, "process count control should be enabled");
   is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT, "default pref value should be default value");
   is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be the default one");
 
+  let contentProcessCountEnabledDescription = doc.querySelector("#contentProcessCountEnabledDescription");
+  is(contentProcessCountEnabledDescription.hidden, false, "process count enabled description should be shown");
+
+  let contentProcessCountDisabledDescription = doc.querySelector("#contentProcessCountDisabledDescription");
+  is(contentProcessCountDisabledDescription.hidden, true, "process count enabled description should be hidden");
+
   allowHWAccel.click();
   allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, !DEFAULT_HW_ACCEL_PREF,
     "pref value should be opposite of the default value after clicking on checkbox");
   is(allowHWAccel.checked, !allowHWAccelPref, "checkbox should show the invert of the current value");
 
   contentProcessCount.value = 7;
   contentProcessCount.doCommand();
copy from browser/components/preferences/in-content/tests/browser_performance.js
copy to browser/components/preferences/in-content/tests/browser_performance_non_e10s.js
--- a/browser/components/preferences/in-content/tests/browser_performance.js
+++ b/browser/components/preferences/in-content/tests/browser_performance_non_e10s.js
@@ -31,109 +31,60 @@ add_task(function*() {
 
   let allowHWAccel = doc.querySelector("#allowHWAccel");
   let allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, DEFAULT_HW_ACCEL_PREF,
     "pref value should be the default value before clicking on checkbox");
   is(allowHWAccel.checked, !DEFAULT_HW_ACCEL_PREF, "checkbox should show the invert of the default value");
 
   let contentProcessCount = doc.querySelector("#contentProcessCount");
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT, "default pref value should be default value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be the default one");
+  is(contentProcessCount.disabled, true, "process count control should be disabled");
+
+  let contentProcessCountEnabledDescription = doc.querySelector("#contentProcessCountEnabledDescription");
+  is(contentProcessCountEnabledDescription.hidden, true, "process count enabled description should be hidden");
+
+  let contentProcessCountDisabledDescription = doc.querySelector("#contentProcessCountDisabledDescription");
+  is(contentProcessCountDisabledDescription.hidden, false, "process count enabled description should be shown");
 
   allowHWAccel.click();
   allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, !DEFAULT_HW_ACCEL_PREF,
     "pref value should be opposite of the default value after clicking on checkbox");
   is(allowHWAccel.checked, !allowHWAccelPref, "checkbox should show the invert of the current value");
 
-  contentProcessCount.value = 7;
-  contentProcessCount.doCommand();
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), 7, "pref value should be 7");
-  is(contentProcessCount.selectedItem.value, 7, "selected item should be 7");
-
   allowHWAccel.click();
   allowHWAccelPref = Services.prefs.getBoolPref("layers.acceleration.disabled");
   is(allowHWAccelPref, DEFAULT_HW_ACCEL_PREF,
     "pref value should be the default value after clicking on checkbox");
   is(allowHWAccel.checked, !allowHWAccelPref, "checkbox should show the invert of the current value");
 
-  contentProcessCount.value = DEFAULT_PROCESS_COUNT;
-  contentProcessCount.doCommand();
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT, "pref value should be default value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be default one");
-
   is(performanceSettings.hidden, false, "performance settings section should be still shown");
 
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(function*() {
   let prefs = yield openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
   is(prefs.selectedPane, "paneGeneral", "General pane was selected");
 
   let doc = gBrowser.contentDocument;
-  let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
-  let allowHWAccel = doc.querySelector("#allowHWAccel");
-  let contentProcessCount = doc.querySelector("#contentProcessCount");
-  let performanceSettings = doc.querySelector("#performanceSettings");
-
-  useRecommendedPerformanceSettings.click();
-  allowHWAccel.click();
-  contentProcessCount.value = 7;
-  contentProcessCount.doCommand();
-  useRecommendedPerformanceSettings.click();
-
-  is(Services.prefs.getBoolPref("browser.preferences.defaultPerformanceSettings.enabled"), true,
-    "pref value should be true before clicking on checkbox");
-  ok(useRecommendedPerformanceSettings.checked, "checkbox should be checked before clicking on checkbox");
-  is(performanceSettings.hidden, true, "performance settings section should be still shown");
-
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-  yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-add_task(function*() {
-  let prefs = yield openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.contentDocument;
   let performanceSettings = doc.querySelector("#performanceSettings");
 
   is(performanceSettings.hidden, true, "performance settings section should not be shown");
 
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);
 
   is(performanceSettings.hidden, false, "performance settings section should be shown");
 
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(function*() {
-  Services.prefs.setIntPref("dom.ipc.processCount", 7);
-
-  let prefs = yield openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.contentDocument;
-
-  let performanceSettings = doc.querySelector("#performanceSettings");
-  is(performanceSettings.hidden, false, "performance settings section should be shown");
-
-  let contentProcessCount = doc.querySelector("#contentProcessCount");
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), 7, "pref value should be 7");
-  is(contentProcessCount.selectedItem.value, 7, "selected item should be 7");
-
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-  yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
-});
-
-add_task(function*() {
   Services.prefs.setBoolPref("layers.acceleration.disabled", true);
 
   let prefs = yield openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
   is(prefs.selectedPane, "paneGeneral", "General pane was selected");
 
   let doc = gBrowser.contentDocument;
 
   let performanceSettings = doc.querySelector("#performanceSettings");
--- a/browser/locales/en-US/chrome/browser/preferences-old/advanced.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences-old/advanced.dtd
@@ -132,10 +132,14 @@
 <!ENTITY useRecommendedPerformanceSettings.accesskey
                                          "U">
 <!ENTITY performanceSettingsLearnMore.label
                                          "Learn more">
 <!ENTITY limitContentProcessOption.label "Content process limit">
 <!ENTITY limitContentProcessOption.description
                                          "Additional content processes can improve performance when using multiple tabs, but will also use more memory.">
 <!ENTITY limitContentProcessOption.accesskey   "L">
+<!ENTITY limitContentProcessOption.disabledDescription
+                                         "Modifying the number of content processes is only possible with multiprocess &brandShortName;.">
+<!ENTITY limitContentProcessOption.disabledDescriptionLink
+                                         "Learn how to check if multiprocess is enabled">
 <!ENTITY allowHWAccel.label              "Use hardware acceleration when available">
 <!ENTITY allowHWAccel.accesskey          "r">
--- a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
@@ -145,10 +145,14 @@
 <!ENTITY useRecommendedPerformanceSettings2.accesskey
                                          "U">
 <!ENTITY performanceSettingsLearnMore.label
                                          "Learn more">
 <!ENTITY limitContentProcessOption.label "Content process limit">
 <!ENTITY limitContentProcessOption.description
                                          "Additional content processes can improve performance when using multiple tabs, but will also use more memory.">
 <!ENTITY limitContentProcessOption.accesskey   "L">
+<!ENTITY limitContentProcessOption.disabledDescription
+                                         "Modifying the number of content processes is only possible with multiprocess &brandShortName;.">
+<!ENTITY limitContentProcessOption.disabledDescriptionLink
+                                         "Learn how to check if multiprocess is enabled">
 <!ENTITY allowHWAccel.label              "Use hardware acceleration when available">
 <!ENTITY allowHWAccel.accesskey          "r">