Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / replace-child-siblings.html
blob9338c398bbecee1608f240ea8db41bd25bdcc769
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>replaceChild siblings bug</title>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
9 function test() {
10 var obj = document.getElementById('child1');
11 var parent = document.getElementById('parent');
12 var nextobj = document.getElementById('child2');
13 var replaced = parent.replaceChild(obj, nextobj);
14 document.getElementById('result').innerText = parent.children.length == 1 ? "PASS" : "FAIL";
16 </script>
17 </head>
18 <body onload="test()">
19 <p>
20 This is a test for <i>https://bugs.webkit.org/show_bug.cgi?id=6069 Assertion failure in LayoutBlockFlow::addChildToFlow during replaceChild</i>.
21 It tests whether replaceChild() works correctly when the new node and the
22 old node are siblings.
23 </p>
24 <hr>
25 <p>Test result: <span id="result"></span></p>
26 <div id="parent">
27 <div id="child1"></div><div id="child2"></div>
28 </div>
29 </body>
30 </html>