Revision control

1
<!doctype html>
2
<html>
3
<head>
4
<title>Test for Bug 48984 - [Chromium] @media print crash due to paged media support</title>
5
<style>
6
* { display: none; }
7
</style>
8
</head>
9
<body>
10
<div id="output">
11
Test has not run yet.
12
Click the print button and see if Chromium crashes.
13
<input type="button" value="print" onclick="testManually()"/>
14
</div>
15
<script>
16
function testManually() {
17
document.documentElement.style.display = "none";
18
window.print();
19
}
20
21
if (window.testRunner) {
22
testRunner.dumpAsText();
23
24
// The test passes if the following line doesn't cause a crash.
25
internals.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4);
26
27
document.getElementById("output").innerHTML = "PASS";
28
}
29
// Remove the display: none; rule. Otherwise, DumpRenderTree dumps weird stuff.
30
document.styleSheets[0].removeRule(0);
31
</script>
32
</body>
33
</html>