blob: c776c087cc4669d1d4efb1b1e170358615ade3b4 [file] [log] [blame]
<html>
<head>
<script>
function f() {
var req = new XMLHttpRequest();
req.open("GET", "hello-world.cgi");
req.setRequestHeader("Cache-Control", "no-cache");
req.send(null);
req.abort();
}
function runTest() {
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
f();
// create lots of objects to force a garbage collection
var i = 0;
var s;
while (i < 5000) {
i = i+1.11;
s = s + " ";
}
// Add a small timeout to give the callbacks a chance to fire
if (window.testRunner)
setTimeout("testRunner.notifyDone()", 100)
}
</script>
</head>
<body onload="runTest()">
This tests that aborting and then garbage collecting an XMLHttpRequest does not cause a crash.
SUCCESS! Didn't crash.
</body>
</html>