Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / printing / page-format-data-display-none.html
bloba1e0d5ab31ee1fba789427d8d0c7a279f6138b79
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();
21 if (window.testRunner) {
22 testRunner.dumpAsText();
24 // The test passes if the following line doesn't cause a crash.
25 internals.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4);
27 document.getElementById("output").innerHTML = "PASS";
29 // Remove the display: none; rule. Otherwise, DumpRenderTree dumps weird stuff.
30 document.styleSheets[0].removeRule(0);
31 </script>
32 </body>
33 </html>