| <p>This tests that calling XMLHttpRequest.abort() removes the responseText for the XMLHttpRequest.</p> |
| <pre id="console"></pre> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| function log(msg) |
| { |
| document.getElementById('console').appendChild(document.createTextNode(msg + "\n")); |
| } |
| |
| req = new XMLHttpRequest(); |
| req.open("GET", "get.txt", false); |
| req.send(); |
| req.abort(); |
| if (!req.responseText.length) |
| log("PASS: abort() cleared the response text."); |
| else |
| log("FAIL: abort() did not clear the response text."); |
| </script> |