summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html10
-rw-r--r--testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html.sub.headers6
2 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html b/testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html
new file mode 100644
index 0000000000..2f7b685a75
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<span id="escape">{{GET[window_url]}}</span>
+
+<script>
+ var window_url = document.getElementById("escape").textContent;
+ window.open(window_url, "_self");
+</script>
diff --git a/testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html.sub.headers b/testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html.sub.headers
new file mode 100644
index 0000000000..5024a99bc9
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/navigation/support/test_csp_self_window.sub.html.sub.headers
@@ -0,0 +1,6 @@
+Expires: Mon, 26 Jul 1997 05:00:00 GMT
+Cache-Control: no-store, no-cache, must-revalidate
+Cache-Control: post-check=0, pre-check=0, false
+Pragma: no-cache
+Set-Cookie: {{GET[report_cookie_name]}}={{$id:uuid()}}; Path=/content-security-policy/navigation/
+Content-Security-Policy: default-src 'none'; script-src 'self' 'unsafe-inline'; report-uri /reporting/resources/report.py?op=put&reportID={{$id}}