blob: cd3b08217026e302a5956821a71d37682e0ba72f [file] [log] [blame] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('Test that the HTML parser does not allow the nesting depth of elements to exceed 512.');
var depth = 512;
var markup = "";
var i;
for (i = 0; i < depth; ++i)
markup += "<div id='d" + i + "'>";
var doc = document.implementation.createHTMLDocument();
doc.body.innerHTML = markup;
var d509 = doc.getElementById("d509");
var d510 = doc.getElementById("d510");
var d511 = doc.getElementById("d511");
shouldBe("d511.parentNode === d509", "true");
shouldBe("d510.parentNode === d509", "true");
shouldBe("d511.previousSibling === d510", "true");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>