blob: ca254b50392a54ef3c7405f8191d98745cdbfb00 [file] [log] [blame]
<html>
<head>
<script>
function testRects()
{
if (!window.testRunner || !window.internals)
return;
testRunner.dumpAsText();
var div = document.getElementById("div");
var rect = div.getBoundingClientRect();
window.internals.setPageScaleFactor(2, 0, 0);
var scaledRect = div.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>