chromium/third_party/blink/web_tests/http/tests/xmlhttprequest/referer.html

<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>