| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| </script> |
| </head> |
| <body> |
| <script> |
| const isAsynchronous = true; |
| var xhr = new XMLHttpRequest; |
| xhr.open("GET", "resources/nph-fail.pl", isAsynchronous); |
| xhr.onload = () => { alertAndDone("FAIL"); } |
| xhr.onerror = () => { |
| // FIXME: Assert that a specific error occurred. |
| alertAndDone("PASS"); |
| } |
| xhr.send(); |
| |
| function alertAndDone(message) |
| { |
| alert(message); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| </script> |
| </body> |
| </html> |