Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / abort-should-destroy-responseText.html
blob671e58d1a0c9cb710687babe4867c0f827ed37c0
1 <p>This tests that calling XMLHttpRequest.abort() removes the responseText for the XMLHttpRequest.</p>
2 <pre id="console"></pre>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 function log(msg)
9 document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
12 req = new XMLHttpRequest();
13 req.open("GET", "get.txt", false);
14 req.send();
15 req.abort();
16 if (!req.responseText.length)
17 log("PASS: abort() cleared the response text.");
18 else
19 log("FAIL: abort() did not clear the response text.");
20 </script>