| <body> |
| <p>Should say PASS:</p> |
| <div id=test style="display:none"></div> |
| <script> |
| function gc() |
| { |
| if (window.GCController) |
| return GCController.collect(); |
| |
| for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect) |
| var s = new String(""); |
| } |
| } |
| |
| function getString(i) |
| { |
| return '<div>' + |
| '<a href="" onclick="return false;"> </a>' + |
| '</div>'; |
| } |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var string = ""; |
| for (i = 0; i < 10000; ++i) |
| string += getString(i); |
| |
| document.getElementById("test").innerHTML = string; |
| |
| gc(); |
| |
| </script> |
| <p>PASS</p> |
| </body> |