blob: 27e119223c3710e9fa0c4387a89946343b11ab0f [file] [log] [blame]
<html>
<head>
<script>
function log(message)
{
var console = document.getElementById("console");
console.appendChild(document.createTextNode(message + "\n"));
}
function testFrame(name)
{
frame = frames[name];
var doc = frame.document;
var target = doc.getElementById("target");
log(name + ": (" + target.offsetLeft + ", " + target.offsetTop + ")");
}
function test()
{
if (window.testRunner)
testRunner.dumpAsText();
testFrame("control");
testFrame("static");
testFrame("absolute");
}
</script>
<style>
iframe { border: thin solid; height: 100px; }
</style>
</head>
<body style="padding: 9px; margin: 10px" onload="test()">
<pre id="console"></pre>
<iframe name="control" src='data:text/html,
<html id="target"></html>
'>
</iframe>
<br>
<iframe name="static" src='data:text/html,
<html id="target" style="padding: 10px; margin: 10px; border: 10px solid blue;">
</html>
'>
</iframe>
<br>
<iframe name="absolute" src='data:text/html,
<html id="target" style="position: absolute; left: 20px; top: 10px; width: 40px; height: 40px; padding: 10px; margin: 0px; border: 10px solid blue">
</html>
'>
</iframe>
</body>
</html>