blob: 2c99e0fc44424434460bf0018ce193080b1428df [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>Test for Bug 48984 - [Chromium] @media print crash due to paged media support</title>
<style>
* { display: none; }
</style>
</head>
<body>
<div id="output">
Test has not run yet.
Click the print button and see if Chromium crashes.
<input type="button" value="print" onclick="testManually()"/>
</div>
<script>
function testManually() {
document.documentElement.style.display = "none";
window.print();
}
if (window.layoutTestController) {
layoutTestController.dumpAsText();
// The test passes if the following line doesn't cause a crash.
layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4);
document.getElementById("output").innerHTML = "PASS";
}
// Remove the display: none; rule. Otherwise, DumpRenderTree dumps weird stuff.
document.styleSheets[0].removeRule(0);
</script>
</body>
</html>