diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp')
36 files changed, 5868 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/fetch.http.html new file mode 100644 index 0000000000..af82605922 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/fetch.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-classic.http.html new file mode 100644 index 0000000000..d2a9ba1b3a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-module.http.html new file mode 100644 index 0000000000..6ac89f1689 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/xhr.http.html new file mode 100644 index 0000000000..a490391314 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer-when-downgrade/xhr.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/fetch.http.html new file mode 100644 index 0000000000..bc8b3cdf0c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/fetch.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted 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/gen/worker-module.http-rp/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-classic.http.html new file mode 100644 index 0000000000..19eadf3a67 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted 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/gen/worker-module.http-rp/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-module.http.html new file mode 100644 index 0000000000..298db8c8ca --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted 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/gen/worker-module.http-rp/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/xhr.http.html new file mode 100644 index 0000000000..0d4d12fa3b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/no-referrer/xhr.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted 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/gen/worker-module.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/fetch.http.html new file mode 100644 index 0000000000..a4b35bf505 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/fetch.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-classic.http.html new file mode 100644 index 0000000000..07799517d4 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-module.http.html new file mode 100644 index 0000000000..95586f4f24 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/xhr.http.html new file mode 100644 index 0000000000..a88a479413 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin-when-cross-origin/xhr.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/fetch.http.html new file mode 100644 index 0000000000..3a28efb5d8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/fetch.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-classic.http.html new file mode 100644 index 0000000000..ca9a19c13a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-module.http.html new file mode 100644 index 0000000000..c213c0564b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/xhr.http.html new file mode 100644 index 0000000000..fce3b7be70 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/origin/xhr.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/fetch.http.html new file mode 100644 index 0000000000..f200e415ca --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/fetch.http.html @@ -0,0 +1,233 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-classic.http.html new file mode 100644 index 0000000000..39ce69461d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-module.http.html new file mode 100644 index 0000000000..55b9ee4eb2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/xhr.http.html new file mode 100644 index 0000000000..67a1b10069 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/same-origin/xhr.http.html @@ -0,0 +1,233 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/fetch.http.html new file mode 100644 index 0000000000..4cc033b437 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/fetch.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-classic.http.html new file mode 100644 index 0000000000..b1a4a79540 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-module.http.html new file mode 100644 index 0000000000..ba3408d98c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/xhr.http.html new file mode 100644 index 0000000000..d0ac356f06 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin-when-cross-origin/xhr.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/fetch.http.html new file mode 100644 index 0000000000..1617f51513 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/fetch.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-classic.http.html new file mode 100644 index 0000000000..07d624de69 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-module.http.html new file mode 100644 index 0000000000..233abfb42c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/xhr.http.html new file mode 100644 index 0000000000..81ddff1eb5 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/strict-origin/xhr.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin 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/gen/worker-module.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/fetch.http.html new file mode 100644 index 0000000000..b07a1144da --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/fetch.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-classic.http.html new file mode 100644 index 0000000000..f5f0fd461b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-classic.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-module.http.html new file mode 100644 index 0000000000..fc5450adc3 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/worker-module.http.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/xhr.http.html new file mode 100644 index 0000000000..2c1f53cd9a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unsafe-url/xhr.http.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/fetch.http.html new file mode 100644 index 0000000000..82d2157988 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-classic.http.html new file mode 100644 index 0000000000..896b9dce2b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-module.http.html new file mode 100644 index 0000000000..804ba16e35 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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/gen/worker-module.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/xhr.http.html new file mode 100644 index 0000000000..6920a3c4c3 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/worker-module.http-rp/unset/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <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> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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": [ + { + "policyDeliveries": [], + "sourceContextType": "worker-module" + } + ], + "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> |