blob: 2db7e74ee6d805a0997f58f9b42b2cd02f820b25 [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.layoutTestController) {
layoutTestController.waitUntilDone();
layoutTestController.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.layoutTestController)
setTimeout("layoutTestController.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>