blob: a180b22204f399dfa4ac3020868515ece3b68f01 [file] [log] [blame]
<body>
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=11611">bug 11611</a>:
REGRESSION: No http referer header sent on XMLHttpRequest.</p>
<div id=sync>sync: </div>
<div id=async>async: </div>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
req = new XMLHttpRequest;
req.open("GET", "resources/print-referer.cgi", false);
req.send(null);
if (req.responseText == document.URL)
document.getElementById("sync").firstChild.data += "OK";
else
document.getElementById("sync").firstChild.data += req.responseText;
req.open("GET", "resources/print-referer.cgi", true);
req.onreadystatechange = processStateChange;
req.send(null);
function processStateChange() {
if (req.readyState == 4) {
if (req.responseText == document.URL)
document.getElementById("async").firstChild.data += "OK";
else
document.getElementById("async").firstChild.data += req.responseText;
if (window.testRunner)
testRunner.notifyDone();
}
}
</script>
</body>