blob: 182f1659660cac208d72fdc4155a76af0f968aa5 [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("PUT", "http://localhost:8000/xmlhttprequest/resources/access-control-basic-non-get-allow.cgi", false);
} catch(e) {
log("FAIL: Exception thrown. Cross-domain access is not allowed in 'open'. [" + e.message + "].");
return;
}
xhr.setRequestHeader("Content-Type", "text/plain; charset=UTF-8");
try {
xhr.send("PASS: PUT data received");
} catch(e) {
log("FAIL: Exception thrown. Cross-domain access is not allowed in 'send'. [" + e.message + "].");
return;
}
log(xhr.responseText);
})();
</script>
</body>
</html>