blob: d6993f06da75fc4ff5409f1c549b42d72e2cc248 [file] [log] [blame]
<html>
<body>
<p>This test that the error event is fired for XMLHttpRequests</p>
<pre id='console'></pre>
<script type="text/javascript">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(message)
{
document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
}
var xhr;
function errorHandler(evt)
{
log("PASS: error event fired.");
if (window.testRunner)
testRunner.notifyDone();
}
xhr = new XMLHttpRequest;
xhr.onerror = errorHandler;
xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-basic-denied.cgi", true);
xhr.send();
</script>
</body>
</html>