4 <div style="width: 1000px; height: 1000px; position: absolute; top: 0; left: 0;"></div>
5 <div style="width: 100px; height: 100px; position: absolute; top: 100px; left: 0; background: green"></div>
7 Test for <i><a href="rdar://problem/6643103">rdar://problem/6643103</a>
8 Unscaled values from body.scrollHeight</i>.
10 <script src="../../resources/js-test.js"></script>
12 var floatPrecision = 0.00001;
13 function checkValue(actual, expected)
15 if (window.eventSender) {
16 shouldBeCloseTo(actual, expected, floatPrecision);
20 if (window.testRunner) {
21 testRunner.dumpAsText();
22 var body = document.body;
23 var documentElement = document.documentElement;
24 checkValue('document.body.scrollHeight', 1000)
25 checkValue('document.body.scrollWidth', 1000);
27 // Scrolling right to 50.
28 documentElement.scrollLeft = 50;
29 checkValue('document.documentElement.scrollLeft', 50);
32 eventSender.zoomPageIn();
33 checkValue('document.body.scrollHeight', 1000);
34 checkValue('document.body.scrollWidth', 1000);
35 checkValue('document.documentElement.scrollTop', 0);
36 checkValue('document.documentElement.scrollLeft', 50);
38 // Scrolling down to 100.
39 documentElement.scrollTop = 100;
40 checkValue('document.documentElement.scrollTop', 100);
43 eventSender.zoomPageOut();
44 checkValue('document.documentElement.scrollTop', 100);
45 checkValue('document.documentElement.scrollLeft', 50);