Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / abort-crash.html
blobc776c087cc4669d1d4efb1b1e170358615ade3b4
1 <html>
2 <head>
3 <script>
5 function f() {
6 var req = new XMLHttpRequest();
7 req.open("GET", "hello-world.cgi");
8 req.setRequestHeader("Cache-Control", "no-cache");
9 req.send(null);
10 req.abort();
13 function runTest() {
14 if (window.testRunner) {
15 testRunner.waitUntilDone();
16 testRunner.dumpAsText();
19 f();
21 // create lots of objects to force a garbage collection
22 var i = 0;
23 var s;
24 while (i < 5000) {
25 i = i+1.11;
26 s = s + " ";
29 // Add a small timeout to give the callbacks a chance to fire
30 if (window.testRunner)
31 setTimeout("testRunner.notifyDone()", 100)
33 </script>
34 </head>
35 <body onload="runTest()">
36 This tests that aborting and then garbage collecting an XMLHttpRequest does not cause a crash.
37 SUCCESS! Didn't crash.
38 </body>
39 </html>