| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta name="referrer" content="origin"> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function receiveMessage(messageEvent) { |
| if (messageEvent.data === "done") { |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } else if (messageEvent.data === "ready") |
| document.getElementById("target").contentWindow.postMessage("new-subframe", "*"); |
| else |
| document.getElementById("log").innerHTML += messageEvent.data + "<br>"; |
| } |
| |
| window.addEventListener("message", receiveMessage, false); |
| </script> |
| </head> |
| <body> |
| <p>This test embeds a subframe that embeds a subframe. It passes, if the referrer is the origin only.</p> |
| <div id="log"></div> |
| <iframe id="target" src="resources/nested-referrer-policy-postmessage.html"></iframe> |
| </body> |
| </html> |