6 var console
= document
.getElementById("console");
7 console
.appendChild(document
.createTextNode(message
+ "\n"));
9 function testFrame(name
)
12 var doc
= frame
.document
;
13 var target
= doc
.getElementById("target");
14 log(name
+ ": (" + target
.offsetLeft
+ ", " + target
.offsetTop
+ ")");
18 if (window
.testRunner
)
19 testRunner
.dumpAsText();
23 testFrame("absolute");
27 iframe { border: thin solid; height:
100px; }
30 <body style=
"padding: 9px; margin: 10px" onload=
"test()">
31 <pre id=
"console"></pre>
33 <iframe name=
"control" src='data:text/html,
34 <html id=
"target"></html>
39 <iframe name=
"static" src='data:text/html,
40 <html id=
"target" style=
"padding: 10px; margin: 10px; border: 10px solid blue;">
47 <iframe name=
"absolute" src='data:text/html,
48 <html id=
"target" style=
"position: absolute; left: 20px; top: 10px; width: 40px; height: 40px; padding: 10px; margin: 0px; border: 10px solid blue">