OLD | NEW |
| (Empty) |
1 <body onload="test()"> | |
2 <p>Running test...</p> | |
3 <textarea id=t rows=20>textarea</textarea> | |
4 <script> | |
5 if (window.testRunner) { | |
6 testRunner.dumpAsText(); | |
7 testRunner.waitUntilDone(); | |
8 } | |
9 | |
10 function gc() | |
11 { | |
12 if (window.GCController) | |
13 return GCController.collect(); | |
14 | |
15 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires
about 9K allocations before a collect) | |
16 var s = new String("abc"); | |
17 } | |
18 } | |
19 | |
20 function test() | |
21 { | |
22 var elem = document.getElementById("t"); | |
23 var nodes = document.getElementById("t").getAttributeNode('rows').childNodes
; | |
24 nodes[0]; // Prime the child node cache. | |
25 document.body.removeChild(document.getElementById("t")); | |
26 elem.getAttributeNode('rows').removeChild(nodes[0]); | |
27 setTimeout(function() { | |
28 gc(); | |
29 try { nodes[0].textContent } catch (ex) { } | |
30 | |
31 document.getElementsByTagName("p")[0].innerHTML = "PASS" | |
32 if (window.testRunner) | |
33 testRunner.notifyDone(); | |
34 }, 0); | |
35 } | |
36 </script> | |
OLD | NEW |