Index: third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/dynamically-sandbox-and-iframe-https.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/dynamically-sandbox-and-iframe-https.html b/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/dynamically-sandbox-and-iframe-https.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a982914d1515713977fefb5978ba6c6833b88089 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/dynamically-sandbox-and-iframe-https.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <title>Dynamically apply sandbox and include HTTPS iframe</title> |
+ <script src="/resources/testharness.js"></script> |
+ <script src="/resources/testharness-helpers.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> |