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