blob: 21f8cf14ecf33c3d9925393d5d86f15afe076a65 [file] [log] [blame]
<html>
<head>
<meta name="referrer" content="origin" />
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
}
window.addEventListener("message", receiveMessage, false);
function receiveMessage(evt) {
if (evt.data == "done") {
if (window.testRunner)
testRunner.notifyDone();
} else {
document.getElementById("log").innerHTML += evt.data + "<br>";
}
}
</script>
</head>
<body>
<p>
This test opens a new window. It passes, if the referrer is the origin
only.
</p>
<div id="log">
</div>
<script>
window.open("resources/referrer-policy-postmessage.php");
</script>
</body>
</html>