Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE HTML>
<html>
<head>
</head>
<body onload="run()">
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
async function run() {
try {
let printerList = Cc["@mozilla.org/gfx/printerlist;1"].getService(
Ci.nsIPrinterList
);
let printers = await printerList.printers;
for (let printer of printers) {
printer.QueryInterface(Ci.nsIPrinter);
info(`Listing basic attributes for ${printer.name}:`);
let [supportsDuplex, supportsColor] = await Promise.all([printer.supportsDuplex, printer.supportsColor]);
info(`* supportsDuplex: ${supportsDuplex}`);
info(`* supportsColor: ${supportsColor}`);
}
ok(true, "Retrieved printer basic attributes successfully.");
} catch (e) {
ok(false, `Error thrown while retrieving printer basic attributes: ${e}.`);
console.error(e);
}
SimpleTest.finish();
}
</script>
</body>
</html>