Revision control

1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
<head>
4
<script src="../resources/js-test-pre.js"></script>
5
<script src="resources/paged-media-test-utils.js"></script>
6
</head>
7
<body>
8
<p id="description"></p>
9
<div id="console"></div>
10
<div id="sandbox"></div>
11
<script>
12
description("Test for page-break-before:always and page-break-after:always");
13
14
function test()
15
{
16
createBlockWithRatioToPageHeight("firstPage", 0.1);
17
createBlockWithRatioToPageHeight("secondPage1", 0.1).style.pageBreakBefore = "always";
18
createBlockWithRatioToPageHeight("secondPage2", 0.1).style.pageBreakAfter = "always";
19
createBlockWithRatioToPageHeight("thirdPage", 0.1).style.pageBreakBefore = "always";
20
21
pageNumberForElementShouldBe('firstPage', 0);
22
pageNumberForElementShouldBe('secondPage1', 1);
23
pageNumberForElementShouldBe('secondPage2', 1);
24
// There must be only one page break between 'page-break-after: always' and 'page-break-before: always'
25
pageNumberForElementShouldBe('thirdPage', 2);
26
27
document.body.removeChild(document.getElementById("sandbox"));
28
}
29
30
var successfullyParsed = true;
31
</script>
32
<script>runPrintingTest(test);</script>
33
<script src="../resources/js-test-post.js"></script>
34
</body>
35
</html>