summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/printing/page-count-with-one-word.html
blob: 11a8af0bb2070fd4f88982d9509530f5465e007e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<body>
<pre id="console">
test
</pre>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();

    var msg = 'A page with only one line should be printed in one page.\n';
    var pass = true;

    // Test the range around A4 portrait paper size
    for (var i = 530; i < 560; i++) {
        for (var j = 730; j < 760; j++) {
            var numberOfPages = internals.numberOfPages(i, j);

            if (numberOfPages != 1) {
                pass = false;
                msg += 'width=' + i + ', height=' + j + ': numberOfPages=' + numberOfPages + ' FAIL\n';
            }
        }
    }
    msg += (pass ? 'PASS' : 'FAIL');
    document.querySelector('#console').textContent = msg;
}
</script>
</body>
</html>