OLD | NEW |
1 <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> | 1 <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> |
2 <p>PASS if no crash.</p> | 2 <p>PASS if no crash.</p> |
| 3 <script src="../../../resources/gc.js"></script> |
3 <SCRIPT> | 4 <SCRIPT> |
4 function gc() | |
5 { | |
6 if (window.GCController) | |
7 return GCController.collect(); | |
8 | |
9 for (var i = 0; i < 10000; i++) | |
10 var s = new String(""); | |
11 } | |
12 | 5 |
13 if (window.testRunner) | 6 if (window.testRunner) |
14 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
15 | 8 |
16 var o = document.implementation.createDocumentType('x', null, null); | 9 var o = document.implementation.createDocumentType('x', null, null); |
17 var doc = document.implementation.createDocument("doc", null); | 10 var doc = document.implementation.createDocument("doc", null); |
18 for (i in o) { | 11 for (i in o) { |
19 try { o[i]; } catch (e) {} | 12 try { o[i]; } catch (e) {} |
20 try { o[i](); } catch (e) {} | 13 try { o[i](); } catch (e) {} |
21 } | 14 } |
22 o.addEventListener("click", function() {}, true); | 15 o.addEventListener("click", function() {}, true); |
23 o.removeEventListener("click", function() {}, true); | 16 o.removeEventListener("click", function() {}, true); |
24 o.childNodes; | 17 o.childNodes; |
25 o.childNodes.item(0); | 18 o.childNodes.item(0); |
26 o.firstChild; | 19 o.firstChild; |
27 gc(); | 20 gc(); |
28 document.write("DONE"); | 21 document.write("DONE"); |
29 </SCRIPT> | 22 </SCRIPT> |
OLD | NEW |