| document.write(this.foo + '<br>'); |
| if (this.readyState == 4) { |
| function collectGarbage() { |
| if (window.GCController) { |
| window.GCController.collect(); |
| for (var i = 0; i < 50000; i++) |
| document.write("Tests that garbage collection doesn't drop the XMLHttpRequest JS wrapper until the send command is done. You should see 'bar' four times below.<br>"); |
| testRunner.waitUntilDone(); |
| var xhr = new XMLHttpRequest(); |
| xhr.onreadystatechange = stateChange; |
| xhr.open("GET", "xmlhttprequest-gc.html", true); |
| <body onload='runTest()'> |