Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / printing / page-rule-css-text.html
blob0a0bb0287a6baa19ced8af235e77276449dc3763
1 <!doctype html>
2 <html>
3 <head>
4 <style type="text/css">
5 @page :visited { /* :visited is invalid for @page */
6 color: red;
8 @page a_page_name:visited { /* :visited is invalid for @page */
9 background-color: red;
12 @page {
13 margin-top:5cm;
14 margin-bottom:10cm;
16 @page :left {
17 margin-right:3cm;
19 @page :right {
20 margin-left:3cm;
22 @page :first {
23 border-width:1px;
25 @page hello {
26 color:green;
28 @page world:right {
29 background-color:green;
31 @media print {
32 @page somepage:first {
33 margin:3cm;
36 @page auto_page {
37 size: auto;
39 @page square_page {
40 size: 4in;
42 @page letter_page {
43 size: letter;
45 @page page_widht_height {
46 size: 10cm 15cm;
48 @page page_size_orientation {
49 size: ledger landscape;
51 @page page_orientation_size {
52 size: portrait a4;
54 @page err_empty_size {
55 size:;
57 @page err_unknow_page_size {
58 size: yotsugiri;
60 @page err_length_and_page_size {
61 size: 10cm letter;
63 @page err_length_and_orientation {
64 size: 10cm landscape;
66 @page err_orientations {
67 size: portrait landscape;
69 @page err_too_many_params {
70 size: a5 landscape auto;
73 table {
74 page: Rotated;
76 div {
77 page: Auto;
79 pre {
80 page: Auto Rotated; /* Invalid */
82 p {
83 page: 1cm; /* Invalid */
86 /* FIXME: Add the following once margin at-rule is implemented.
88 @page :first {
89 @top-left-corner {
90 content:"TLC";
92 @bottom-center {
93 content:"BC";
97 </style>
98 <script type="text/javascript">
100 if (window.testRunner)
101 testRunner.dumpAsText();
103 function print(str)
105 document.getElementById("output").innerHTML += str;
108 function printCssTextOfPageRules()
110 var ss = document.styleSheets;
111 for (var i = 0; i < ss.length; i++) {
112 for (var j = 0; j < ss[i].cssRules.length; j++) {
113 print(ss[i].cssRules[j].cssText + "<br/>");
118 </script>
119 </head>
120 <body onload="printCssTextOfPageRules();">
121 <div id="output"></div>
122 </body>
123 </html>