Bug 1657991 - Don't bail out on some printpreview tests if there are no printers. r=jwatt

Before bug 1657164 there was always some printer on Linux and this test
ran just fine.

We don't really need a printer to test print preview, the test works
just fine.

I noticed this while auditing the "lastPrinterName" checks.

Differential Revision: https://phabricator.services.mozilla.com/D86404
This commit is contained in:
Emilio Cobos Álvarez 2020-08-13 11:57:36 +00:00
Родитель 54e1b28bc8
Коммит ce8137da72
2 изменённых файлов: 6 добавлений и 23 удалений

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

@ -53,20 +53,11 @@ function finish() {
window.close();
}
function run1()
{
/** Test for Bug 482976 **/
var printService = Cc["@mozilla.org/gfx/printsettings-service;1"]
.getService(Ci.nsIPrintSettingsService);
if (printService.lastUsedPrinterName != '') {
printpreview();
ok(gWbp.doingPrintPreview, "Should be doing print preview");
exitprintpreview();
ok(!gWbp.doingPrintPreview, "Should not be doing print preview anymore");
} else {
todo(false, "No printer seems installed on this machine, that is necessary for this test");
}
async function run1() {
printpreview();
ok(gWbp.doingPrintPreview, "Should be doing print preview");
exitprintpreview();
ok(!gWbp.doingPrintPreview, "Should not be doing print preview anymore");
finish();
}
]]></script>

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

@ -99,15 +99,7 @@ function finish() {
function runTests()
{
var printService = Cc["@mozilla.org/gfx/printsettings-service;1"]
.getService(Ci.nsIPrintSettingsService);
if (printService.lastUsedPrinterName != '') {
startTest1();
} else {
todo(false, "No printer seems installed on this machine, that is necessary for this test");
finish();
}
startTest1();
}
function compareCanvases(options = {}) {