summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp')
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html63
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html143
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers2
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html33
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html43
-rw-r--r--testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html43
99 files changed, 3412 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
new file mode 100644
index 0000000000..2641813ea7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
new file mode 100644
index 0000000000..8f682e685a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
new file mode 100644
index 0000000000..31111c3cce
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
new file mode 100644
index 0000000000..5985002bc7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
new file mode 100644
index 0000000000..4a62f71b44
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
new file mode 100644
index 0000000000..95ef48cdbb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
new file mode 100644
index 0000000000..180358e691
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/no-referrer-when-downgrade/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: no-referrer-when-downgrade
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..a15ea7c65c
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..be66cf9321
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/same-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: same-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
new file mode 100644
index 0000000000..4cff1d12f8
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/strict-origin-when-cross-origin/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: strict-origin-when-cross-origin
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html
new file mode 100644
index 0000000000..2641813ea7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/a-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html
new file mode 100644
index 0000000000..8f682e685a
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/fetch.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html
new file mode 100644
index 0000000000..31111c3cce
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/iframe-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html
new file mode 100644
index 0000000000..5985002bc7
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/img-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html
new file mode 100644
index 0000000000..4a62f71b44
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/script-tag.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/sharedworker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-classic.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/worker-module.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html
new file mode 100644
index 0000000000..95ef48cdbb
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "cross-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-https",
+ "redirection": "swap-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers
new file mode 100644
index 0000000000..c1d3fd1a0b
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unsafe-url/xhr.http.html.headers
@@ -0,0 +1,2 @@
+Access-Control-Allow-Origin: *
+Referrer-Policy: unsafe-url
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html
new file mode 100644
index 0000000000..5e2f9f5523
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/a-tag.http.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "a-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html
new file mode 100644
index 0000000000..74334b36cc
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/fetch.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "fetch",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html
new file mode 100644
index 0000000000..569b0ac8e2
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/iframe-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "iframe-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html
new file mode 100644
index 0000000000..e04c767ed5
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/img-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "img-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html
new file mode 100644
index 0000000000..ca1042d6a6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/script-tag.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "script-tag",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html
new file mode 100644
index 0000000000..6feb01bda6
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/sharedworker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "sharedworker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html
new file mode 100644
index 0000000000..43642c590d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-classic.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-classic",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html
new file mode 100644
index 0000000000..0d35924ddd
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/worker-module.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "worker-module",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html
new file mode 100644
index 0000000000..7814f3492d
--- /dev/null
+++ b/testing/web-platform/tests/referrer-policy/4K+1/gen/top.http-rp/unset/xhr.http.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/4K+1/` -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="timeout" content="long">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/security-features/resources/common.sub.js"></script>
+ <script src="../../../../generic/test-case.sub.js"></script>
+ <script src="../../../generic/test-case.sub.js"></script>
+ </head>
+ <body>
+ <script>
+ TestCase(
+ [
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "keep-origin",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context."
+ },
+ {
+ "expectation": "stripped-referrer",
+ "origin": "same-http",
+ "redirection": "no-redirect",
+ "source_context_list": [],
+ "source_scheme": "http",
+ "subresource": "xhr",
+ "subresource_policy_deliveries": [],
+ "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context."
+ }
+ ],
+ new SanityChecker()
+ ).start();
+ </script>
+ <div id="log"></div>
+ </body>
+</html>