| OLD | NEW |
| 1 <!-- https://bugs.webkit.org/show_bug.cgi?id=22672 | 1 <!-- https://bugs.webkit.org/show_bug.cgi?id=22672 |
| 2 ASSERT(m_table) when xhr.onabort creates another xhr or calls setTimeout | 2 ASSERT(m_table) when xhr.onabort creates another xhr or calls setTimeout |
| 3 --> | 3 --> |
| 4 <script> | 4 <script> |
| 5 if (window.testRunner) { | 5 if (window.testRunner) { |
| 6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
| 7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
| 8 } | 8 } |
| 9 | 9 |
| 10 function abortHandler() | 10 function abortHandler() |
| 11 { | 11 { |
| 12 xhr2 = new XMLHttpRequest; | 12 xhr2 = new XMLHttpRequest; |
| 13 setTimeout("alert('FAAAIL!')", 100); | 13 setTimeout("alert('FAAAIL!')", 100); |
| 14 } | 14 } |
| 15 | 15 |
| 16 function onreadystatechangeHandler() | 16 function onreadystatechangeHandler() |
| 17 { | 17 { |
| 18 if (xhr.readyState == 4) | 18 if (xhr.readyState == 4) |
| 19 abortHandler(); | 19 abortHandler(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 xhr = new XMLHttpRequest; | 22 xhr = new XMLHttpRequest; |
| 23 xhr.onabort = abortHandler; | 23 xhr.onabort = abortHandler; |
| 24 xhr.onreadystatechange = onreadystatechangeHandler; | 24 xhr.onreadystatechange = onreadystatechangeHandler; |
| 25 xhr.open("GET", "foo.txt", true); | 25 xhr.open("GET", "foo.txt", true); |
| 26 xhr.send(null); | 26 xhr.send(null); |
| 27 location.href = "data:text/html,PASS: No assertion failure.<script>if (window.te
stRunner) testRunner.notifyDone()</scr" + "ipt>"; | 27 location.href = "../misc/resources/notify-success.html"; |
| 28 </script> | 28 </script> |
| OLD | NEW |