Commit 65f9687e authored by Dorel Luca's avatar Dorel Luca
Browse files

Backed out 4 changesets (bug 1470280) for browser-chrome failure in...

Backed out 4 changesets (bug 1470280) for browser-chrome failure in layout/xul/test/browser_bug703210.js. a=backout

Backed out changeset 72e7ef77480d (bug 1470280)
Backed out changeset 403c3d0daf6a (bug 1470280)
Backed out changeset fe7ccd9fee76 (bug 1470280)
Backed out changeset 60699c2387f6 (bug 1470280)
parent c5bc5672
Loading
Loading
Loading
Loading
+5 −6
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.
@@ -122,10 +120,7 @@ add_task(async function startup() {

// This opens 10 tabs and checks pref getters.
add_task(async function open_10_tabs() {
  // 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 max = 15;

  let whitelist = {
    "layout.css.dpi": {
@@ -151,6 +146,10 @@ add_task(async function open_10_tabs() {
      min: 10,
      max: 18,
    },
    "dom.ipc.processCount": {
      min: 10,
      max: 15,
    },
    "browser.startup.record": {
      max: 20,
    },
+1 −3
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@
/* 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.
@@ -17,7 +15,7 @@ add_task(async function test_slow_content_script() {

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

add_task(async function testPrefsSetByUser() {
  const kNewCount = DEFAULT_PROCESS_COUNT - 2;

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

  let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
@@ -58,8 +56,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"), kNewCount, "process count should be the set value");
  is(contentProcessCount.selectedItem.value, kNewCount, "selected item should be the set one");
  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();
+5 −2
Original line number Diff line number Diff line
@@ -5,11 +5,14 @@ const CONTENT_CREATED = "ipc:content-created";
// Make sure that BTU.withNewTab({ ..., forceNewProcess: true }) loads
// new tabs in their own process.
async function spawnNewAndTest(recur, pids) {
  let processCreated = TestUtils.topicObserved(CONTENT_CREATED);
  await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank", forceNewProcess: true },
                                    async function(browser) {
      // Make sure our new browser is in its own process.
      // Make sure our new browser is in its own process. The processCreated
      // promise should have already resolved by this point.
      await processCreated;
      let newPid = browser.frameLoader.tabParent.osPid;
      ok(!pids.has(newPid), "new tab is in its own process: " + recur);
      ok(!pids.has(newPid), "new tab is in its own process");
      pids.add(newPid);

      if (recur) {
Loading