Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / offsetLeft-offsetTop-html.html
blob27e119223c3710e9fa0c4387a89946343b11ab0f
1 <html>
2 <head>
3 <script>
4 function log(message)
6 var console = document.getElementById("console");
7 console.appendChild(document.createTextNode(message + "\n"));
9 function testFrame(name)
11 frame = frames[name];
12 var doc = frame.document;
13 var target = doc.getElementById("target");
14 log(name + ": (" + target.offsetLeft + ", " + target.offsetTop + ")");
16 function test()
18 if (window.testRunner)
19 testRunner.dumpAsText();
21 testFrame("control");
22 testFrame("static");
23 testFrame("absolute");
25 </script>
26 <style>
27 iframe { border: thin solid; height: 100px; }
28 </style>
29 </head>
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>
36 </iframe>
38 <br>
39 <iframe name="static" src='data:text/html,
40 <html id="target" style="padding: 10px; margin: 10px; border: 10px solid blue;">
41 </html>
43 </iframe>
45 <br>
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">
49 </html>
51 </iframe>
52 </body>
53 </html>