Commit fa375662 authored by Gurzau Raul's avatar Gurzau Raul
Browse files

Merge inbound to mozilla-central. a=merge

parents 5c218126 59490ec8
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

const DEFAULT_PROCESS_COUNT = Services.prefs.getDefaultBranch(null).getIntPref("dom.ipc.processCount");

/**
 * A test that checks whether any preference getter from the given list
 * of stats was called more often than the max parameter.
@@ -120,7 +122,10 @@ add_task(async function startup() {

// This opens 10 tabs and checks pref getters.
add_task(async function open_10_tabs() {
  let max = 15;
  // This is somewhat arbitrary. When we had a default of 4 content processes
  // the value was 15. We need to scale it as we increase the number of
  // content processes so we approximate with 4 * process_count.
  const max = 4 * DEFAULT_PROCESS_COUNT;

  let whitelist = {
    "layout.css.dpi": {
@@ -146,10 +151,6 @@ add_task(async function open_10_tabs() {
      min: 10,
      max: 18,
    },
    "dom.ipc.processCount": {
      min: 10,
      max: 15,
    },
    "browser.startup.record": {
      max: 20,
    },
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ support-files =
[browser_autoSubmitRequest.js]
[browser_clearEmail.js]
[browser_noPermanentKey.js]
skip-if = (os == "linux") || verify # Bug 1383315
skip-if = true # Bug 1383315
[browser_showForm.js]
[browser_shown.js]
skip-if = (verify && !debug && (os == 'win'))
+3 −1
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";

const DEFAULT_PROCESS_COUNT = Services.prefs.getDefaultBranch(null).getIntPref("dom.ipc.processCount");

add_task(async function test_slow_content_script() {
  // Make sure we get a new process for our tab, or our reportProcessHangs
  // preferences value won't apply to it.
@@ -15,7 +17,7 @@ add_task(async function test_slow_content_script() {

  await SpecialPowers.pushPrefEnv({
    set: [
      ["dom.ipc.processCount", 8],
      ["dom.ipc.processCount", DEFAULT_PROCESS_COUNT * 2],
      ["dom.ipc.processPrelaunch.enabled", false],
      ["dom.ipc.reportProcessHangs", true],
    ],
+1 −0
Original line number Diff line number Diff line
@@ -613,6 +613,7 @@
          <menuitem label="5" value="5"/>
          <menuitem label="6" value="6"/>
          <menuitem label="7" value="7"/>
          <menuitem label="8" value="8"/>
        </menupopup>
      </menulist>
    </hbox>
+5 −3
Original line number Diff line number Diff line
@@ -44,7 +44,9 @@ add_task(async function testPrefsAreDefault() {
});

add_task(async function testPrefsSetByUser() {
  Services.prefs.setIntPref("dom.ipc.processCount", DEFAULT_PROCESS_COUNT + 2);
  const kNewCount = DEFAULT_PROCESS_COUNT - 2;

  Services.prefs.setIntPref("dom.ipc.processCount", kNewCount);
  Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);

  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
@@ -56,8 +58,8 @@ add_task(async function testPrefsSetByUser() {

  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");
  is(Services.prefs.getIntPref("dom.ipc.processCount"), kNewCount, "process count should be the set value");
  is(contentProcessCount.selectedItem.value, kNewCount, "selected item should be the set one");

  let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
  useRecommendedPerformanceSettings.click();
Loading