blob: 21ae4ed22c45a5eca4de6d9773565aa7e0868268 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head id="head_element">
<script src="../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests page custom size style.");
function appendStyle(styleString)
{
var styleElement = document.createElement("style");
styleElement.innerHTML = styleString;
document.getElementById("head_element").appendChild(styleElement);
}
if (window.testRunner) {
testRunner.dumpAsText();
// Page size style tests.
debug("Test page size: 10in 10in. Page has custom page size style");
appendStyle("@page {size:10in 10in;}");
shouldBe("testRunner.hasCustomPageSizeStyle(0)", "true");
debug("Test page size: auto. Page does not have any custom page size style");
appendStyle("@page {size:auto;}");
shouldBe("testRunner.hasCustomPageSizeStyle(0)", "false");
debug("");
} else {
testFailed("This test can be run only with window.testRunner");
}
</script>
</body>
</html>