blob: 28e589cadd3fdc67f61a92af9e551295ec6d78cc [file] [log] [blame]
eae@chromium.org2ec82282012-02-28 05:42:45 +00001<html>
2<body>
3<pre id="console">
4test
5</pre>
6<script>
rniwa@webkit.org5cf7fa82012-06-15 07:38:37 +00007if (window.testRunner) {
8 testRunner.dumpAsText();
eae@chromium.org2ec82282012-02-28 05:42:45 +00009
10 var msg = 'Document zoom should not apply when printing.';
11 var pass = true;
eae@chromium.orgd1e7d8e2012-02-28 19:24:26 +000012
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) {
kaustubh@motorola.com478c5092012-09-05 11:36:03 +000016 if (internals.numberOfPages(100, i) == 1) {
eae@chromium.orgd1e7d8e2012-02-28 19:24:26 +000017 height = i;
18 break;
19 }
20 }
21
22 // Zoom in and verify that page count does not change.
eae@chromium.org2ec82282012-02-28 05:42:45 +000023 for (var i = 0; i < 10; i++) {
kaustubh@motorola.com478c5092012-09-05 11:36:03 +000024 var numberOfPages = internals.numberOfPages(100, height);
eae@chromium.org2ec82282012-02-28 05:42:45 +000025 if (numberOfPages != 1) {
26 pass = false;
eae@chromium.orgd1e7d8e2012-02-28 19:24:26 +000027 msg += 'Got ' + numberOfPages + ' pages, expected 1 page.\n';
eae@chromium.org2ec82282012-02-28 05:42:45 +000028 }
29 eventSender.zoomPageIn();
30 }
31
32 msg = (pass ? 'PASS' : 'FAIL') + ' ' + msg;
33 document.querySelector('#console').textContent = msg;
34}
35</script>
36</body>
37</html>