OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
| 4 <script src="../../resources/gc.js"></script> |
4 if (window.testRunner) { | 5 if (window.testRunner) { |
5 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
6 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
7 } | 8 } |
8 | 9 |
9 function gc() | |
10 { | |
11 if (window.GCController) | |
12 return GCController.collect(); | |
13 | |
14 for (var i = 0; i < 10000; i++) { // force garbage collection (F
F requires about 9K allocations before a collect). | |
15 var s = new String("abc"); | |
16 } | |
17 } | |
18 | |
19 function runTest() | 10 function runTest() |
20 { | 11 { |
21 iteratorRoot = document.createElement('div'); | 12 iteratorRoot = document.createElement('div'); |
22 element = iteratorRoot.appendChild(document.createElement('div')
); | 13 element = iteratorRoot.appendChild(document.createElement('div')
); |
23 element.appendChild(document.createElement('div')); | 14 element.appendChild(document.createElement('div')); |
24 | 15 |
25 iterator = document.createNodeIterator(iteratorRoot, -1); | 16 iterator = document.createNodeIterator(iteratorRoot, -1); |
26 iterator.nextNode(); iterator.nextNode(); iterator.nextNode(); | 17 iterator.nextNode(); iterator.nextNode(); iterator.nextNode(); |
27 iterator.previousNode(); | 18 iterator.previousNode(); |
28 | 19 |
(...skipping 10 matching lines...) Expand all Loading... |
39 | 30 |
40 if (window.testRunner) | 31 if (window.testRunner) |
41 testRunner.notifyDone(); | 32 testRunner.notifyDone(); |
42 } | 33 } |
43 </script> | 34 </script> |
44 </head> | 35 </head> |
45 <body onload="runTest()"> | 36 <body onload="runTest()"> |
46 Test passes if it does not crash. | 37 Test passes if it does not crash. |
47 </body> | 38 </body> |
48 </html> | 39 </html> |
OLD | NEW |