| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="/js-test-resources/js-test.js"></script> | 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <script> | 3 <script> |
| 4 jsTestIsAsync = true; | 4 jsTestIsAsync = true; |
| 5 | 5 |
| 6 var xhr = new XMLHttpRequest(); | 6 var xhr = new XMLHttpRequest(); |
| 7 xhr.responseType = 'document'; | 7 xhr.responseType = 'document'; |
| 8 xhr.onreadystatechange = function () { | 8 xhr.onreadystatechange = function () { |
| 9 if (this.readyState == XMLHttpRequest.LOADING) { | 9 if (this.readyState == XMLHttpRequest.LOADING) { |
| 10 xhr.abort(); | 10 xhr.abort(); |
| 11 requestAnimationFrame(function() { | 11 setTimeout(function() { |
| 12 debug("PASS if no crash or leak."); | 12 debug("PASS if no crash or leak."); |
| 13 testRunner.notifyDone(); | 13 testRunner.notifyDone(); |
| 14 }); | 14 }, 0); |
| 15 } | 15 } |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 xhr.open("GET", "resources/small-chunks.cgi", true); | 18 xhr.open("GET", "resources/small-chunks.cgi", true); |
| 19 xhr.send(null); | 19 xhr.send(null); |
| 20 </script> | 20 </script> |
| OLD | NEW |