<!-- https://bugs.webkit.org/show_bug.cgi?id=22672
ASSERT(m_table) when xhr.onabort creates another xhr or calls setTimeout
-->
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function abortHandler()
{
xhr2 = new XMLHttpRequest;
setTimeout("alert('FAAAIL!')", 2000);
}
function onreadystatechangeHandler()
{
if (xhr.readyState == 4)
abortHandler();
}
xhr = new XMLHttpRequest;
xhr.onabort = abortHandler;
xhr.onreadystatechange = onreadystatechangeHandler;
xhr.open("GET", "foo.txt", true);
xhr.send(null);
location.href = "../misc/resources/notify-success.html";
</script>