blob: cc57790942f9059a7ee55adc7121bf8223b43f82 [file] [log] [blame]
<script>
function test() {
if (window.layoutTestController) layoutTestController.dumpAsText();
var node = document.createElement("div");
document.getElementById("replace").parentNode.replaceChild(node, document.getElementById("replace"));
document.getElementById("result").appendChild(document.createTextNode(node.parentNode));
}
</script>
<body onload="test()">
<p>This tests for a bug in replaceChild where it would fail to replace an element if it was the first child of its container.
See <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=6782">bug 6782</a> for details.
If the test is successful you will see an object description below, and if it fails you will see "null".</p>
<div><div id="replace"></div></div>
<div id="result"></div></body>