| <html> |
| <head> |
| <script> |
| function testRects() |
| { |
| if (!window.testRunner || !window.internals) |
| return; |
| testRunner.dumpAsText(); |
| |
| var range = document.createRange(); |
| range.selectNode(document.getElementById('div')); |
| var rect = range.getBoundingClientRect(); |
| |
| window.internals.setPageScaleFactor(2, 0, 0); |
| var scaledRange = document.createRange(); |
| scaledRange.selectNode(document.getElementById('div')); |
| var scaledRect = scaledRange.getBoundingClientRect(); |
| |
| var result = document.getElementById("result"); |
| if (rect.left == scaledRect.left && |
| rect.top == scaledRect.top && |
| rect.right == scaledRect.right && |
| rect.bottom == scaledRect.bottom) |
| result.innerHTML = "Pass"; |
| else |
| result.innerHTML = "Fail"; |
| |
| } |
| </script> |
| </head> |
| |
| <body onload="testRects();"> |
| <div id="div" style="width:100px; height:100px; background-color:green;"></div> |
| <p id="result">This test must be run via DumpRenderTree.</p> |
| </body> |
| </html> |