blob: 72001a01e1f984bfa353812080e03de5872c68d3 [file] [log] [blame]
<html>
<body>
<pre id='console'></pre>
<script type="text/javascript">
function log(message)
{
document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
}
if (window.testRunner)
testRunner.dumpAsText();
(function() {
var xhr = new XMLHttpRequest;
try {
xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-basic-denied.cgi", false);
} catch(e) {
log("FAIL: Exception thrown. Cross-domain access is not allowed in 'open'. [" + e.message + "].");
return;
}
try {
xhr.send();
} catch(e) {
log("PASS: Exception thrown. Cross-domain access was denied in 'send'. [" + e.message + "].");
return;
}
log(xhr.responseText);
})();
</script>
</body>
</html>