Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / table / resources / recalc-section-first-body-crash.html
blobddacc1495cb7ac07cf000eb63dff0540c01b1a18
1 <html>
2 <body onload="runTest();">
3 <junk>a</junk>
4 <junk>a</junk>
5 <junk id="test1" style="display: -webkit-box; visibility: collapse;">
6 <iframe>a</iframe><junk style="display: table-row-group;">a</junk>
7 </junk>
8 <div>a</div><junk></junk>
9 <div id="test2" style="display: table-cell;"></div>
11 <script type="text/javascript">
12 function reference(domNode)
14 this.domNode = domNode;
17 function walk(arr, currentPrefix, index, domNode)
19 if (domNode == null)
20 return;
21 newPrefix = currentPrefix + "_" + index;
22 walk(arr, currentPrefix, index + 1, domNode.nextSibling);
23 walk(arr, newPrefix, 0, domNode.firstChild);
24 arr[newPrefix] = new reference(domNode);
27 function removeAll()
29 var arr = new Array();
30 walk(arr, "", 0, document.body);
31 for (key in arr) {
32 arr[key].domNode.parentNode.removeChild(arr[key].domNode);
33 if (document.body)
34 document.body.offsetTop;
38 function runTest()
40 var test1 = document.getElementById('test1');
41 test1.parentNode.removeChild(test1);
42 var test2 = document.getElementById('test2');
43 test2.appendChild(test1);
44 removeAll();
46 </script>
47 </body>
48 </html>