| OLD | NEW | 
|---|
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> | 
| 2 <html> | 2 <html> | 
| 3 <body> | 3 <body> | 
| 4     <div style="width: 1000px; height: 1000px; position: absolute; top: 0; left:
     0;"></div> | 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; lef
    t: 0; background: green"></div> | 5     <div style="width: 100px; height: 100px; position: absolute; top: 100px; lef
    t: 0; background: green"></div> | 
| 6     <p> | 6     <p> | 
| 7         Test for <i><a href="rdar://problem/6643103">rdar://problem/6643103</a> | 7         Test for <i><a href="rdar://problem/6643103">rdar://problem/6643103</a> | 
| 8         Unscaled values from body.scrollHeight</i>. | 8         Unscaled values from body.scrollHeight</i>. | 
| 9     </p> | 9     </p> | 
| 10     <script src="../../resources/js-test.js"></script> | 10     <script src="../../resources/js-test.js"></script> | 
| 11     <script> | 11     <script> | 
| 12         var floatPrecision = 0.00001; | 12         var floatPrecision = 0.00001; | 
| 13         function checkValue(actual, expected) | 13         function checkValue(actual, expected) | 
| 14         { | 14         { | 
| 15             if (window.eventSender) { | 15             if (window.eventSender) { | 
| 16                shouldBeCloseTo(actual, expected, floatPrecision); | 16                shouldBeCloseTo(actual, expected, floatPrecision); | 
| 17             } | 17             } | 
| 18         } | 18         } | 
| 19 | 19 | 
| 20         if (window.testRunner) { | 20         if (window.testRunner) { | 
| 21             testRunner.dumpAsText(); | 21             testRunner.dumpAsText(); | 
| 22             var body = document.body; | 22             checkValue('document.scrollingElement.scrollHeight', 1000) | 
| 23             var documentElement = document.documentElement; | 23             checkValue('document.scrollingElement.scrollWidth', 1000); | 
| 24             checkValue('document.body.scrollHeight', 1000) |  | 
| 25             checkValue('document.body.scrollWidth', 1000); |  | 
| 26 | 24 | 
| 27             // Scrolling right to 50. | 25             // Scrolling right to 50. | 
| 28             body.scrollLeft = 50; | 26             document.scrollingElement.scrollLeft = 50; | 
| 29             checkValue('document.body.scrollLeft', 50); | 27             checkValue('document.scrollingElement.scrollLeft', 50); | 
| 30 | 28 | 
| 31             // Zooming in. | 29             // Zooming in. | 
| 32             eventSender.zoomPageIn(); | 30             eventSender.zoomPageIn(); | 
| 33             checkValue('document.body.scrollHeight', 1000); | 31             checkValue('document.scrollingElement.scrollHeight', 1000); | 
| 34             checkValue('document.body.scrollWidth', 1000); | 32             checkValue('document.scrollingElement.scrollWidth', 1000); | 
| 35             checkValue('document.body.scrollTop', 0); | 33             checkValue('document.scrollingElement.scrollTop', 0); | 
| 36             checkValue('document.body.scrollLeft', 50); | 34             checkValue('document.scrollingElement.scrollLeft', 50); | 
| 37 | 35 | 
| 38             // Scrolling down to 100. | 36             // Scrolling down to 100. | 
| 39             body.scrollTop = 100; | 37             document.scrollingElement.scrollTop = 100; | 
| 40             checkValue('document.body.scrollTop', 100); | 38             checkValue('document.scrollingElement.scrollTop', 100); | 
| 41 | 39 | 
| 42             // Zooming back out. | 40             // Zooming back out. | 
| 43             eventSender.zoomPageOut(); | 41             eventSender.zoomPageOut(); | 
| 44             checkValue('document.body.scrollTop', 100); | 42             checkValue('document.scrollingElement.scrollTop', 100); | 
| 45             checkValue('document.body.scrollLeft', 50); | 43             checkValue('document.scrollingElement.scrollLeft', 50); | 
| 46         } | 44         } | 
| 47     </script> | 45     </script> | 
| 48 </body> | 46 </body> | 
| 49 </html> | 47 </html> | 
| OLD | NEW | 
|---|