| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| function testRects() |
| { |
| if (!window.testRunner || !window.internals) |
| return; |
| testRunner.dumpAsText(); |
| |
| var div = document.getElementById("frame").contentDocument.getElementById("div"); |
| var rect = div.getClientRects()[0]; |
| window.internals.setPageScaleFactor(2, 0, 0); |
| var scaledRect = div.getClientRects()[0]; |
| |
| 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();"> |
| <iframe id="frame" src="resources/client-rect-frame.html" width="300" height="200"></iframe> |
| <p id="result">This test must be run via DumpRenderTree.</p> |
| </body> |
| </html> |