| OLD | NEW |
| 1 <body> | 1 <body> |
| 2 <pre id=preOnerror>FAIL: onerror was not called.</pre> | 2 <pre id=preOnerror>FAIL: onerror was not called.</pre> |
| 3 <pre id=console></pre> | 3 <pre id=console></pre> |
| 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 log(message) | 10 function log(message) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 checkResponse(); | 39 checkResponse(); |
| 40 if (!hadError) | 40 if (!hadError) |
| 41 log("PASS"); | 41 log("PASS"); |
| 42 if (window.testRunner) | 42 if (window.testRunner) |
| 43 testRunner.notifyDone() | 43 testRunner.notifyDone() |
| 44 }, 100); | 44 }, 100); |
| 45 } | 45 } |
| 46 | 46 |
| 47 var req = new XMLHttpRequest; | 47 var req = new XMLHttpRequest; |
| 48 req.open("GET", "http://localhost:8000/xmlhttprequest/resources/reply.xml", fals
e); | 48 req.open("GET", "http://localhost:8000/xmlhttprequest/resources/reply.xml", fals
e); |
| 49 req.onerror = stealResponse; | |
| 50 try { | 49 try { |
| 51 req.send(null); | 50 req.send(null); |
| 52 error("send did not raise an exception"); | 51 error("send did not raise an exception"); |
| 53 } catch (ex) { | 52 } catch (ex) { |
| 53 stealResponse(); |
| 54 } | 54 } |
| 55 </script> | 55 </script> |
| 56 </body> | 56 </body> |
| OLD | NEW |