| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head id="h"> | 3 <head id="h"> |
| 4 </head> | 4 </head> |
| 5 <body> | 5 <body> |
| 6 <script src="../../resources/gc.js"></script> |
| 6 <script> | 7 <script> |
| 7 if (window.testRunner) | 8 if (window.testRunner) |
| 8 window.testRunner.dumpAsText(); | 9 window.testRunner.dumpAsText(); |
| 9 | 10 |
| 10 var link = document.createElement('link'); | 11 var link = document.createElement('link'); |
| 11 link.setAttribute('type', 'text/css'); | 12 link.setAttribute('type', 'text/css'); |
| 12 link.setAttribute('rel', 'stylesheet'); | 13 link.setAttribute('rel', 'stylesheet'); |
| 13 link.setAttribute('href', 'really-does-not-exist.css'); | 14 link.setAttribute('href', 'really-does-not-exist.css'); |
| 14 document.getElementById('h').appendChild(link); | 15 document.getElementById('h').appendChild(link); |
| 15 link.parentNode.removeChild(link); | 16 link.parentNode.removeChild(link); |
| 16 link = null; | 17 link = null; |
| 17 </script> | 18 </script> |
| 18 <script> | 19 <script> |
| 19 function gc() { | |
| 20 if (window.GCController) | |
| 21 GCController.collect(); | |
| 22 else { | |
| 23 // Allocate a sufficient number of objects to force a GC. | |
| 24 for (var i = 0; i < 10000; i++) | |
| 25 new Object; | |
| 26 } | |
| 27 } | |
| 28 | |
| 29 gc(); | 20 gc(); |
| 30 </script> | 21 </script> |
| 31 <p>This test passes if it doesn't crash</p> | 22 <p>This test passes if it doesn't crash</p> |
| 32 </body> | 23 </body> |
| 33 </html> | 24 </html> |
| OLD | NEW |