blob: 39f9e352021e9ea8fcd24d5b118ea6f12148b65a [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>replaceChild siblings bug</title>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function test() {
var obj = document.getElementById('child1');
var parent = document.getElementById('parent');
var nextobj = document.getElementById('child2');
var replaced = parent.replaceChild(obj, nextobj);
document.getElementById('result').innerText = parent.children.length == 1 ? "PASS" : "FAIL";
}
</script>
</head>
<body onload="test()">
<p>
This is a test for <i>https://bugs.webkit.org/show_bug.cgi?id=6069 Assertion failure in RenderBlock::addChildToFlow during replaceChild</i>.
It tests whether replaceChild() works correctly when the new node and the
old node are siblings.
</p>
<hr>
<p>Test result: <span id="result"></span></p>
<div id="parent">
<div id="child1"></div><div id="child2"></div>
</div>
</body>
</html>