blob: a1e0d5ab31ee1fba789427d8d0c7a279f6138b79 [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.testRunner) {
testRunner.dumpAsText();
// The test passes if the following line doesn't cause a crash.
internals.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>