| <!-- webkit-test-runner [ SiteIsolationEnabled=true ] --> |
| <script src="/js-test-resources/js-test.js"></script> |
| <script> |
| |
| description("Verifies permissions policy is set correctly on nested cross-site frames"); |
| jsTestIsAsync = true; |
| |
| onmessage = (event) => { |
| let iframe = document.getElementById("iframe"); |
| let src = iframe.src; |
| if (src.includes("exception")) { |
| shouldBe("event.data", "'exception'"); |
| shouldBe("event.origin", "'http://127.0.0.1'"); |
| |
| iframe.removeAttribute("allow"); |
| iframe.src = "http://localhost:8000/site-isolation/resources/permissions-policy-nested-iframe.html?pass" |
| } else if (src.includes("pass")) { |
| shouldBe("event.data", "'pass'"); |
| shouldBe("event.origin", "'http://127.0.0.1'"); |
| |
| finishJSTest(); |
| } |
| } |
| |
| </script> |
| <body> |
| <iframe id="iframe" allow="sync-xhr 'none'" src="http://localhost:8000/site-isolation/resources/permissions-policy-nested-iframe.html?exception"></iframe> |
| </body> |