blob: 1466961265817b49c63a600cff0ec67cadf9ce1a [file] [log] [blame]
<html>
<body>
<div style="position:relative; display:inline; border:1px solid black">Div
<a id="anchor" style="border:1px solid red">Anchor</a>
</div>
<br><br>
<span id="result">FAIL! This test has failed because the offsetParent of the anchor is coming back as null :-(</span>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var anchor = document.getElementById("anchor");
var result = document.getElementById("result");
if (anchor.offsetParent)
result.innerHTML = "Success! This test succeeded because the div is rightly recognized as the anchor's offsetParent :-)";
</script>
</body>
</html>