5 function test(id, expected) {
6 var adjust = window.getComputedStyle(document.getElementById(id)).webkitPrintColorAdjust;
7 if (adjust == expected)
8 output.push("SUCCESS");
10 output.push("FAILURE. -webkit-print-color-adjust was " + adjust + ", it should have been " + expected);
14 if (window.layoutTestController)
15 window.layoutTestController.dumpAsText();
17 test("economy", "economy");
18 test("exact", "exact");
20 document.body.innerHTML = output.join("\n");
25 <body onLoad="runTests();" style="white-space: pre-wrap;">
26 <div id="economy" style="-webkit-print-color-adjust:economy;"></div>
27 <div id="exact" style="-webkit-print-color-adjust:exact;"></div>