blob: 99bb35b4b58bea82c43cd7d33432d25cff6b76f3 [file] [log] [blame]
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=26402">bug 26402<a/>: Crashes when using a detached DocumentType node.</p>
<p>PASS if no crash.</p>
<SCRIPT>
function gc()
{
if (window.GCController)
return GCController.collect();
for (var i = 0; i < 10000; i++)
var s = new String("");
}
if (window.testRunner)
testRunner.dumpAsText();
var o = document.implementation.createDocumentType('x', null, null);
var doc = document.implementation.createDocument("doc", null, 0);
for (i in o) {
try { o[i]; } catch (e) {}
try { o[i](); } catch (e) {}
}
o.addEventListener("click", function() {}, true);
o.removeEventListener("click", function() {}, true);
o.childNodes;
o.childNodes.item(0);
o.firstChild;
gc();
document.write("DONE");
</SCRIPT>