Bug 1672171 - Set the modal dialog pref in a subtest that relies on it.

Differential Revision: https://phabricator.services.mozilla.com/D94106
This commit is contained in:
Emilio Cobos Álvarez 2020-10-20 13:40:56 +00:00
parent 0b32ab452c
commit 72dbf3440c

View File

@ -174,6 +174,9 @@ add_task(async function testEnterPrintsFromOrientation() {
add_task(async function testPrintOnNewWindowDoesntClose() {
info("Test that printing doesn't close a window with a single tab");
await SpecialPowers.pushPrefEnv({
set: [["print.tab_modal.enabled", true]],
});
let win = await BrowserTestUtils.openNewBrowserWindow();
let browser = win.gBrowser.selectedBrowser;
await BrowserTestUtils.loadURI(browser, PrintHelper.defaultTestPageUrl);
@ -190,4 +193,5 @@ add_task(async function testPrintOnNewWindowDoesntClose() {
});
ok(!win.closed, "Shouldn't be closed");
await BrowserTestUtils.closeWindow(win);
await SpecialPowers.popPrefEnv();
});