blob: 6d24d7b1480c30fe3651505e36edd1465becbe3d [file] [log] [blame]
<html><body>
This tests whether referrer information gets properly set and reset when "noreferrer" links are present. We do the following:<br/>
1. Open a link in a new window: referrer is sent and window.opener is sent.<br/>
2. Click a rel="noreferrer" link: referrer is null, but window.opener remains set since the link was not opened with target="_blank".<br/>
3. Click a link without rel="noreferrer": referrer is sent, but window.opener is still set.
<br/>
<a id="link" href="resources/no-referrer-reset-helper.py" target="_blank" rel="opener">Start reset test</a>
<script>
window.name = "consoleWindow";
window.noreferrerStepDone = false;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var target = document.getElementById("link");
eventSender.mouseMoveTo(target.offsetLeft + 2, target.offsetTop + 2);
eventSender.mouseDown();
eventSender.mouseUp();
function log(msg)
{
var line = document.createElement('div');
line.appendChild(document.createTextNode(msg));
document.getElementById('console').appendChild(line);
}
</script>
<div id="console"></div>
</body></html>