blob: da798895c1e37301a449b96731b4df8342cc4b17 [file] [log] [blame]
<!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>