Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / replace-first-child.html
blob21905ea888e63df75406f6fa2ea7e91c93eaae56
1 <script>
2 function test() {
3 if (window.testRunner) testRunner.dumpAsText();
4 var node = document.createElement("div");
5 document.getElementById("replace").parentNode.replaceChild(node, document.getElementById("replace"));
6 document.getElementById("result").appendChild(document.createTextNode(node.parentNode));
8 </script>
9 <body onload="test()">
10 <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.
11 See <a href="https://bugs.webkit.org/show_bug.cgi?id=6782">bug 6782</a> for details.
12 If the test is successful you will see an object description below, and if it fails you will see "null".</p>
13 <div><div id="replace"></div></div>
14 <div id="result"></div></body>