OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Dynamically apply sandbox and include HTTPS iframe</title> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharness-helpers.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 <script src="/resources/get-host-info.js"></script> |
| 9 </head> |
| 10 <body> |
| 11 </body> |
| 12 <script> |
| 13 window.addEventListener("message", function (e) { |
| 14 var meta = document.createElement("meta"); |
| 15 meta.httpEquiv = "Content-Security-Policy"; |
| 16 meta.content = "sandbox allow-scripts"; |
| 17 document.head.appendChild(meta); |
| 18 e.source.postMessage("go", "*"); |
| 19 }); |
| 20 |
| 21 var i = document.createElement("iframe"); |
| 22 i.src = get_host_info().HTTPS_REMOTE_ORIGIN + "/security/secureContexts/reso
urces/post-securecontext-status-on-msg.html" |
| 23 document.body.appendChild(i); |
| 24 </script> |
| 25 </html> |
OLD | NEW |