Revision control

1
<html>
2
<body>
3
<pre id="console">
4
test
5
</pre>
6
<script>
7
if (window.testRunner) {
8
testRunner.dumpAsText();
9
10
var msg = 'Document zoom should not apply when printing.';
11
var pass = true;
12
13
// Determine minium page size height where text fits on a single page.
14
var height;
15
for (var i = 10; i < 100; i += 5) {
16
if (internals.numberOfPages(100, i) == 1) {
17
height = i;
18
break;
19
}
20
}
21
22
// Zoom in and verify that page count does not change.
23
for (var i = 0; i < 10; i++) {
24
var numberOfPages = internals.numberOfPages(100, height);
25
if (numberOfPages != 1) {
26
pass = false;
27
msg += 'Got ' + numberOfPages + ' pages, expected 1 page.\n';
28
}
29
eventSender.zoomPageIn();
30
}
31
32
msg = (pass ? 'PASS' : 'FAIL') + ' ' + msg;
33
document.querySelector('#console').textContent = msg;
34
}
35
</script>
36
</body>
37
</html>