3 <head id=
"head_element">
4 <script src=
"../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
10 description("This tests page custom size style.");
11 function appendStyle(styleString
)
13 var styleElement
= document
.createElement("style");
14 styleElement
.innerHTML
= styleString
;
15 document
.getElementById("head_element").appendChild(styleElement
);
18 if (window
.testRunner
) {
19 testRunner
.dumpAsText();
21 // Page size style tests.
22 debug("Test page size: 10in 10in. Page has custom page size style");
23 appendStyle("@page {size:10in 10in;}");
24 shouldBe("testRunner.hasCustomPageSizeStyle(0)", "true");
26 debug("Test page size: auto. Page does not have any custom page size style");
27 appendStyle("@page {size:auto;}");
28 shouldBe("testRunner.hasCustomPageSizeStyle(0)", "false");
32 testFailed("This test can be run only with window.testRunner");