Backed out changeset 9bba40accbf6 (bug 1384962) for frequently exceeding maximum run time for browser/components/preferences/in-content/tests/browser_performance.js. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 28 Jul 2017 11:01:21 +0200
changeset 422666 09a412e3cc3b1a1fd9a1325e161d36b91018ef24
parent 422665 66c1061c0d08b3fff5bb0d4b47a268ab5b50f2be
child 422722 16ffc1d05422a81099ce8b9b59de66dde4c8b2f0
child 422724 de8759dd2b22a168169a51dd22575171f90db92a
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1384962
milestone56.0a1
backs out9bba40accbf61384715d963df18e05227676591f
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 9bba40accbf6 (bug 1384962) for frequently exceeding maximum run time for browser/components/preferences/in-content/tests/browser_performance.js. r=backout
browser/components/preferences/in-content-new/main.js
browser/components/preferences/in-content-new/tests/browser_performance.js
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/tests/browser_performance.js
--- a/browser/components/preferences/in-content-new/main.js
+++ b/browser/components/preferences/in-content-new/main.js
@@ -187,19 +187,19 @@ var gMainPane = {
     let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
     performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
 
     this.updateDefaultPerformanceSettingsPref();
 
     let defaultPerformancePref =
       document.getElementById("browser.preferences.defaultPerformanceSettings.enabled");
     defaultPerformancePref.addEventListener("change", () => {
-      this.updatePerformanceSettingsBox({duringChangeEvent: true});
+      this.updatePerformanceSettingsBox();
     });
-    this.updatePerformanceSettingsBox({duringChangeEvent: false});
+    this.updatePerformanceSettingsBox();
 
     // set up the "use current page" label-changing listener
     this._updateUseCurrentButton();
     window.addEventListener("focus", this._updateUseCurrentButton.bind(this));
 
     this.updateBrowserStartupLastSession();
 
     if (AppConstants.platform == "win") {
@@ -1109,34 +1109,33 @@ var gMainPane = {
     let processCountPref = document.getElementById("dom.ipc.processCount");
     let accelerationPref = document.getElementById("layers.acceleration.disabled");
     if (processCountPref.value != processCountPref.defaultValue ||
         accelerationPref.value != accelerationPref.defaultValue) {
       defaultPerformancePref.value = false;
     }
   },
 
-  updatePerformanceSettingsBox({duringChangeEvent}) {
+  updatePerformanceSettingsBox() {
     let defaultPerformancePref =
       document.getElementById("browser.preferences.defaultPerformanceSettings.enabled");
     let performanceSettings = document.getElementById("performanceSettings");
     let processCountPref = document.getElementById("dom.ipc.processCount");
     if (defaultPerformancePref.value) {
       let accelerationPref = document.getElementById("layers.acceleration.disabled");
       // Unset the value so process count will be decided by e10s rollout.
       processCountPref.value = processCountPref.defaultValue;
       accelerationPref.value = accelerationPref.defaultValue;
       performanceSettings.hidden = true;
     } else {
       let e10sRolloutProcessCountPref =
         document.getElementById("dom.ipc.processCount.web");
       // Take the e10s rollout value as the default value (if it exists),
       // but don't overwrite the user set value.
-      if (duringChangeEvent &&
-          e10sRolloutProcessCountPref.value &&
+      if (e10sRolloutProcessCountPref.value &&
           processCountPref.value == processCountPref.defaultValue) {
         processCountPref.value = e10sRolloutProcessCountPref.value;
       }
       performanceSettings.hidden = false;
     }
   },
 
   buildContentProcessCountMenuList() {
--- a/browser/components/preferences/in-content-new/tests/browser_performance.js
+++ b/browser/components/preferences/in-content-new/tests/browser_performance.js
@@ -131,108 +131,16 @@ add_task(async function() {
   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.clearUserPref("dom.ipc.processCount");
-  Services.prefs.setIntPref("dom.ipc.processCount.web", DEFAULT_PROCESS_COUNT + 1);
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-
-  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.contentDocument;
-  let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
-
-  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");
-
-  useRecommendedPerformanceSettings.click();
-
-  let performanceSettings = doc.querySelector("#performanceSettings");
-  is(performanceSettings.hidden, false, "performance settings section is shown");
-
-  is(Services.prefs.getBoolPref("browser.preferences.defaultPerformanceSettings.enabled"), false,
-     "pref value should be false after clicking on checkbox");
-  ok(!useRecommendedPerformanceSettings.checked, "checkbox should not be checked after clicking on checkbox");
-
-  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 + 1, "e10s rollout value should be default value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT + 1, "selected item should be the default one");
-
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.clearUserPref("dom.ipc.processCount.web");
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-});
-
-add_task(async function() {
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.setIntPref("dom.ipc.processCount.web", DEFAULT_PROCESS_COUNT + 1);
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);
-
-  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 is shown");
-
-  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 value should be the current value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be the default one");
-
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.clearUserPref("dom.ipc.processCount.web");
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-});
-
-add_task(async function() {
-  Services.prefs.setIntPref("dom.ipc.processCount", DEFAULT_PROCESS_COUNT + 2);
-  Services.prefs.setIntPref("dom.ipc.processCount.web", DEFAULT_PROCESS_COUNT + 1);
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);
-
-  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 is shown");
-
-  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 + 2, "process count should be the set value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT + 2, "selected item should be the set one");
-
-  let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
-  useRecommendedPerformanceSettings.click();
-
-  is(Services.prefs.getBoolPref("browser.preferences.defaultPerformanceSettings.enabled"), true,
-    "pref value should be true after clicking on checkbox");
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT,
-    "process count should be default value");
-
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.clearUserPref("dom.ipc.processCount.web");
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-});
-
-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
@@ -45,19 +45,19 @@ var gMainPane = {
     }
 
     this.buildContentProcessCountMenuList();
     this.updateDefaultPerformanceSettingsPref();
 
     let defaultPerformancePref =
       document.getElementById("browser.preferences.defaultPerformanceSettings.enabled");
     defaultPerformancePref.addEventListener("change", () => {
-      this.updatePerformanceSettingsBox({duringChangeEvent: true});
+      this.updatePerformanceSettingsBox();
     });
-    this.updatePerformanceSettingsBox({duringChangeEvent: false});
+    this.updatePerformanceSettingsBox();
 
     let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
     let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
     performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
 
     // set up the "use current page" label-changing listener
     this._updateUseCurrentButton();
     window.addEventListener("focus", this._updateUseCurrentButton.bind(this));
@@ -420,34 +420,33 @@ var gMainPane = {
     let processCountPref = document.getElementById("dom.ipc.processCount");
     let accelerationPref = document.getElementById("layers.acceleration.disabled");
     if (processCountPref.value != processCountPref.defaultValue ||
         accelerationPref.value != accelerationPref.defaultValue) {
       defaultPerformancePref.value = false;
     }
   },
 
-  updatePerformanceSettingsBox({duringChangeEvent}) {
+  updatePerformanceSettingsBox() {
     let defaultPerformancePref =
       document.getElementById("browser.preferences.defaultPerformanceSettings.enabled");
     let performanceSettings = document.getElementById("performanceSettings");
     let processCountPref = document.getElementById("dom.ipc.processCount");
     if (defaultPerformancePref.value) {
       let accelerationPref = document.getElementById("layers.acceleration.disabled");
       // Unset the value so process count will be decided by e10s rollout.
       processCountPref.value = processCountPref.defaultValue;
       accelerationPref.value = accelerationPref.defaultValue;
       performanceSettings.hidden = true;
     } else {
       let e10sRolloutProcessCountPref =
         document.getElementById("dom.ipc.processCount.web");
       // Take the e10s rollout value as the default value (if it exists),
       // but don't overwrite the user set value.
-      if (duringChangeEvent &&
-          e10sRolloutProcessCountPref.value &&
+      if (e10sRolloutProcessCountPref.value &&
           processCountPref.value == processCountPref.defaultValue) {
         processCountPref.value = e10sRolloutProcessCountPref.value;
       }
       performanceSettings.hidden = false;
     }
   },
 
   buildContentProcessCountMenuList() {
--- a/browser/components/preferences/in-content/tests/browser_performance.js
+++ b/browser/components/preferences/in-content/tests/browser_performance.js
@@ -131,108 +131,16 @@ add_task(async function() {
   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.clearUserPref("dom.ipc.processCount");
-  Services.prefs.setIntPref("dom.ipc.processCount.web", DEFAULT_PROCESS_COUNT + 1);
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-
-  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.selectedBrowser.contentDocument;
-  let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
-
-  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");
-
-  useRecommendedPerformanceSettings.click();
-
-  let performanceSettings = doc.querySelector("#performanceSettings");
-  is(performanceSettings.hidden, false, "performance settings section is shown");
-
-  is(Services.prefs.getBoolPref("browser.preferences.defaultPerformanceSettings.enabled"), false,
-     "pref value should be false after clicking on checkbox");
-  ok(!useRecommendedPerformanceSettings.checked, "checkbox should not be checked after clicking on checkbox");
-
-  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 + 1, "e10s rollout value should be default value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT + 1, "selected item should be the default one");
-
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.clearUserPref("dom.ipc.processCount.web");
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-});
-
-add_task(async function() {
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.setIntPref("dom.ipc.processCount.web", DEFAULT_PROCESS_COUNT + 1);
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);
-
-  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.selectedBrowser.contentDocument;
-  let performanceSettings = doc.querySelector("#performanceSettings");
-  is(performanceSettings.hidden, false, "performance settings section is shown");
-
-  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 value should be the current value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT, "selected item should be the default one");
-
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.clearUserPref("dom.ipc.processCount.web");
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-});
-
-add_task(async function() {
-  Services.prefs.setIntPref("dom.ipc.processCount", DEFAULT_PROCESS_COUNT + 2);
-  Services.prefs.setIntPref("dom.ipc.processCount.web", DEFAULT_PROCESS_COUNT + 1);
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);
-
-  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
-  is(prefs.selectedPane, "paneGeneral", "General pane was selected");
-
-  let doc = gBrowser.selectedBrowser.contentDocument;
-  let performanceSettings = doc.querySelector("#performanceSettings");
-  is(performanceSettings.hidden, false, "performance settings section is shown");
-
-  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 + 2, "process count should be the set value");
-  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT + 2, "selected item should be the set one");
-
-  let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
-  useRecommendedPerformanceSettings.click();
-
-  is(Services.prefs.getBoolPref("browser.preferences.defaultPerformanceSettings.enabled"), true,
-    "pref value should be true after clicking on checkbox");
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT,
-    "process count should be default value");
-
-  await BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
-  Services.prefs.clearUserPref("dom.ipc.processCount");
-  Services.prefs.clearUserPref("dom.ipc.processCount.web");
-  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
-});
-
-add_task(async function() {
   Services.prefs.setBoolPref("layers.acceleration.disabled", true);
 
   let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", null, {leaveOpen: true});
   is(prefs.selectedPane, "paneGeneral", "General pane was selected");
 
   let doc = gBrowser.contentDocument;
 
   let performanceSettings = doc.querySelector("#performanceSettings");