blob: 59b6baf451bb5a0480e7fe05fce34ab1011e8a34 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Dynamically apply sandbox and include HTTPS iframe</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/get-host-info.js"></script>
</head>
<body>
</body>
<script>
window.addEventListener("message", function (e) {
var meta = document.createElement("meta");
meta.httpEquiv = "Content-Security-Policy";
meta.content = "sandbox allow-scripts";
document.head.appendChild(meta);
e.source.postMessage("go", "*");
});
var i = document.createElement("iframe");
i.src = get_host_info().HTTPS_REMOTE_ORIGIN + "/security/secureContexts/resources/post-securecontext-status-on-msg.html"
document.body.appendChild(i);
</script>
</html>