blob: bc8e1ad69c18f2352de28aebd74de62597ec6501 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function gc()
{
if (window.GCController)
return GCController.collect();
for (var i = 0; i < 10000; i++) { // force garbage collection (FF requires about 9K allocations before a collect).
var s = new String("abc");
}
}
function runTest()
{
iteratorRoot = document.createElement();
element = iteratorRoot.appendChild(document.createElement());
element.appendChild(document.createElement());
iterator = document.createNodeIterator(iteratorRoot, -1);
iterator.nextNode(); iterator.nextNode(); iterator.nextNode();
iterator.previousNode();
iteratorRoot.removeChild(element);
otherDocument = document.implementation.createHTMLDocument();
otherDocument.body.appendChild(iteratorRoot);
delete iterator;
gc();
div = document.body.appendChild(document.createElement('div'));
document.body.removeChild(div);
gc();
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="runTest()">
Test passes if it does not crash.
</body>
</html>