diff options
Diffstat (limited to '')
2 files changed, 12 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/generic/support/load_img_and_post_result_header.html b/testing/web-platform/tests/content-security-policy/generic/support/load_img_and_post_result_header.html new file mode 100644 index 0000000000..c7a2e75dba --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/generic/support/load_img_and_post_result_header.html @@ -0,0 +1,11 @@ +<html> +<body> + <script> + var img = document.createElement("img"); + img.src = "/content-security-policy/support/pass.png"; + img.onload = function() { parent.postMessage('img loaded', '*'); } + img.onerror = function() { parent.postMessage('img not loaded', '*'); } + document.body.appendChild(img); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/content-security-policy/generic/support/load_img_and_post_result_header.html.sub.headers b/testing/web-platform/tests/content-security-policy/generic/support/load_img_and_post_result_header.html.sub.headers new file mode 100644 index 0000000000..e9bf21bab4 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/generic/support/load_img_and_post_result_header.html.sub.headers @@ -0,0 +1 @@ +Content-Security-Policy: {{GET[csp]}} |