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 internals.pageNumber()");
13
14
function test()
15
{
16
// Assuming that one page has about 20 lines.
17
createBlockWithNumberOfLines("firstPage", 20);
18
createBlockWithNumberOfLines("secondPage", 20);
19
20
createBlockWithNumberOfLines("thirdPage", 5);
21
createBlockWithNumberOfLines("thirdPage2", 5);
22
23
pageNumberForElementShouldBe('firstPage', 0);
24
pageNumberForElementShouldBe('secondPage', 1);
25
pageNumberForElementShouldBe('thirdPage', 2);
26
pageNumberForElementShouldBe('thirdPage2', 2);
27
28
document.body.removeChild(document.getElementById("sandbox"));
29
}
30
31
var successfullyParsed = true;
32
</script>
33
<script>runPrintingTest(test);</script>
34
<script src="../resources/js-test-post.js"></script>
35
</body>
36
</html>