30 lines
791 B
HTML
30 lines
791 B
HTML
<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, null);
|
|
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>
|