Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / parser / script-tests / block-nesting-cap.js
blob0b4c20d66396b3221e08ce43a4cc74fad22e5d36
1 description('Test that the HTML parser does not allow the nesting depth of elements to exceed 512.');
3 var depth = 514;
4 var markup = "";
5 var i;
6 for (i = 0; i < depth; ++i)
7 markup += "<div id='d" + i + "'>";
8 var doc = document.implementation.createHTMLDocument();
9 doc.body.innerHTML = markup;
11 var d510 = doc.getElementById("d510");
12 var d511 = doc.getElementById("d511");
13 var d512 = doc.getElementById("d512");
15 shouldBe("d512.parentNode === d510", "true");
16 shouldBe("d511.parentNode === d510", "true");
17 shouldBe("d512.previousSibling === d511", "true");