blob: 2735f7c423e5eedea8ce098983dcc788361acf8c [file] [edit]
<!-- webkit-test-runner [ StorageBlockingPolicy=1 ] -->
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var async = new XMLHttpRequest();
async.onreadystatechange = function () {
if (async.readyState === 4) {
alert("Verifying credentials are used when given: " + async.responseText);
var sync = new XMLHttpRequest();
sync.open("GET", 'resources/basic-auth.py', false);
sync.send();
alert("Verifying credentials are used preemptively for sync xhr: " + sync.responseText);
if (window.testRunner)
testRunner.notifyDone();
}
};
async.open('GET', 'resources/basic-auth.py', true, "username", "password");
async.send();
</script>