38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../resources/js-test-pre.js"></script>
|
|
<script src="resources/paged-media-test-utils.js"></script>
|
|
</head>
|
|
<body>
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
<div id="sandbox"></div>
|
|
<script>
|
|
description("Test for page-break with 'display:none'");
|
|
|
|
function test()
|
|
{
|
|
createBlockWithRatioToPageHeight("page1-1", 0.1).style.pageBreakBefore = "always";
|
|
|
|
// if 'display' is 'none', page break property should not have any effect.
|
|
var block = createBlockWithRatioToPageHeight("displaynone", 0.1);
|
|
block.style.pageBreakBefore = "always";
|
|
block.style.display = "none";
|
|
|
|
createBlockWithRatioToPageHeight("page1-2", 0.1);
|
|
|
|
pageNumberForElementShouldBe("page1-1", 1);
|
|
pageNumberForElementShouldBe("displaynone", -1);
|
|
pageNumberForElementShouldBe("page1-2", 1);
|
|
|
|
document.body.removeChild(document.getElementById("sandbox"));
|
|
}
|
|
|
|
var successfullyParsed = true;
|
|
</script>
|
|
<script>runPrintingTest(test);</script>
|
|
<script src="../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|