Bug 1301340 - part2: Force single content process in some tests. r=mrbkap

This commit is contained in:
Gabor Krizsanits 2016-10-12 19:50:42 +02:00
Родитель 5f1c1c094f
Коммит 876516c028
6 изменённых файлов: 36 добавлений и 19 удалений

Просмотреть файл

@ -91,7 +91,7 @@ function waitForCondition(condition, nextTest, errorMsg, okMsg) {
moveOn();
}
tries++;
}, 100);
}, 500);
var moveOn = function() {
clearInterval(interval); nextTest();
};

Просмотреть файл

@ -169,7 +169,9 @@ function test() {
PopupNotifications.panel.removeAttribute("animate");
});
waitForExplicitFinish();
runSocialTests(tests, undefined, postTestCleanup);
SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 1]]}, () => {
runSocialTests(tests, undefined, postTestCleanup);
});
}
var tests = {

Просмотреть файл

@ -65,7 +65,10 @@ var gTests = [
function test() {
waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 1]]}, runTest);
}
function runTest() {
// An empty tab where we can load the content script without leaving it
// behind at the end of the test.
gBrowser.addTab();

Просмотреть файл

@ -213,6 +213,8 @@ this.IsolationTestTools = {
// Make sure preferences are set properly.
yield SpecialPowers.pushPrefEnv({"set": aPref});
yield SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 1]]});
yield aTask(aMode);
});
},

Просмотреть файл

@ -30,6 +30,12 @@ let checkToolbox = Task.async(function* (tab, location) {
ok(!!gDevTools.getToolbox(target), `Toolbox exists ${location}`);
});
add_task(function* setup() {
yield SpecialPowers.pushPrefEnv({
set: [["dom.ipc.processCount", 1]]
});
});
add_task(function* () {
let tab = yield addTab(TEST_URL);

Просмотреть файл

@ -58,23 +58,27 @@ function test() {
Services.prefs.setCharPref(PREF_DISCOVERURL, MAIN_URL);
var gProvider = new MockProvider();
gProvider.createAddons([{
id: "test1@tests.mozilla.org",
name: "Test add-on 1",
description: "foo"
},
{
id: "test2@tests.mozilla.org",
name: "Test add-on 2",
description: "bar"
},
{
id: "test3@tests.mozilla.org",
name: "Test add-on 3",
type: "theme",
description: "bar"
}]);
SpecialPowers.pushPrefEnv({"set": [
["dom.ipc.processCount", 1],
]}, () => {
var gProvider = new MockProvider();
gProvider.createAddons([{
id: "test1@tests.mozilla.org",
name: "Test add-on 1",
description: "foo"
},
{
id: "test2@tests.mozilla.org",
name: "Test add-on 2",
description: "bar"
},
{
id: "test3@tests.mozilla.org",
name: "Test add-on 3",
type: "theme",
description: "bar"
}]);
});
run_next_test();
}