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/iframe.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/iframe.http-rp')
90 files changed, 15015 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/a-tag.http.html new file mode 100644 index 0000000000..f1f2922073 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/a-tag.http.html @@ -0,0 +1,107 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/fetch.http.html new file mode 100644 index 0000000000..b7e0f595f2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/iframe-tag.http.html new file mode 100644 index 0000000000..d5bfd2b50a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/img-tag.http.html new file mode 100644 index 0000000000..c324e8cd7e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/script-tag.http.html new file mode 100644 index 0000000000..4d57f8c26a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-classic.http.html new file mode 100644 index 0000000000..22eb1e2954 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-module.http.html new file mode 100644 index 0000000000..4508b27090 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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/iframe.http-rp/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-classic.http.html new file mode 100644 index 0000000000..436592e04f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/worker-module.http.html new file mode 100644 index 0000000000..467bedf744 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer-when-downgrade/xhr.http.html new file mode 100644 index 0000000000..4d19f48f8a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/a-tag.http.html new file mode 100644 index 0000000000..decbbda04c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/a-tag.http.html @@ -0,0 +1,107 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/fetch.http.html new file mode 100644 index 0000000000..d523a3109f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/iframe-tag.http.html new file mode 100644 index 0000000000..7761fb304d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/img-tag.http.html new file mode 100644 index 0000000000..f71ded5fb6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/script-tag.http.html new file mode 100644 index 0000000000..5430b987e1 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-classic.http.html new file mode 100644 index 0000000000..0995bcdb0a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-module.http.html new file mode 100644 index 0000000000..2991201b1d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-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/iframe.http-rp/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-classic.http.html new file mode 100644 index 0000000000..538136079f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/worker-module.http.html new file mode 100644 index 0000000000..44427600d9 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/no-referrer/xhr.http.html new file mode 100644 index 0000000000..ab624c0248 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/a-tag.http.html new file mode 100644 index 0000000000..e4c0a46454 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/a-tag.http.html @@ -0,0 +1,107 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/fetch.http.html new file mode 100644 index 0000000000..c7726795b0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/iframe-tag.http.html new file mode 100644 index 0000000000..3b9e56daf6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/img-tag.http.html new file mode 100644 index 0000000000..9390e76dc3 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/script-tag.http.html new file mode 100644 index 0000000000..e47e3756f9 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..382da887af --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..103c19e599 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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/iframe.http-rp/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-classic.http.html new file mode 100644 index 0000000000..66e2049df2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/worker-module.http.html new file mode 100644 index 0000000000..0ad84cd003 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin-when-cross-origin/xhr.http.html new file mode 100644 index 0000000000..f2d5d14f43 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/a-tag.http.html new file mode 100644 index 0000000000..8f72f1e49e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/a-tag.http.html @@ -0,0 +1,107 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/fetch.http.html new file mode 100644 index 0000000000..6783464cb0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/iframe-tag.http.html new file mode 100644 index 0000000000..33fdbb165a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/img-tag.http.html new file mode 100644 index 0000000000..643d67642c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/script-tag.http.html new file mode 100644 index 0000000000..369c51249c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..55bee06493 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-module.http.html new file mode 100644 index 0000000000..86b6fa4378 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-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/iframe.http-rp/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-classic.http.html new file mode 100644 index 0000000000..257f3d7979 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/worker-module.http.html new file mode 100644 index 0000000000..fb5d2dbd4e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/origin/xhr.http.html new file mode 100644 index 0000000000..6f8e94468f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/a-tag.http.html new file mode 100644 index 0000000000..eeaa4336fa --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/a-tag.http.html @@ -0,0 +1,86 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/fetch.http.html new file mode 100644 index 0000000000..7e27bcf458 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/iframe-tag.http.html new file mode 100644 index 0000000000..556c02fced --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/img-tag.http.html new file mode 100644 index 0000000000..a1c21c7879 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/script-tag.http.html new file mode 100644 index 0000000000..1482e6ab23 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..950a1d4d25 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..f016f91d5e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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/iframe.http-rp/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-classic.http.html new file mode 100644 index 0000000000..cf70c87048 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/worker-module.http.html new file mode 100644 index 0000000000..5e4d368767 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/same-origin/xhr.http.html new file mode 100644 index 0000000000..95d8d350bb --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/a-tag.http.html new file mode 100644 index 0000000000..525bfa27f2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/a-tag.http.html @@ -0,0 +1,107 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/fetch.http.html new file mode 100644 index 0000000000..ebef571be7 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/iframe-tag.http.html new file mode 100644 index 0000000000..63e090472c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/img-tag.http.html new file mode 100644 index 0000000000..abad45992b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/script-tag.http.html new file mode 100644 index 0000000000..733005e56c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..e0bba29ee7 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..82a82e00df --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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/iframe.http-rp/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-classic.http.html new file mode 100644 index 0000000000..9491e8be2f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/worker-module.http.html new file mode 100644 index 0000000000..a15bda3e1d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin-when-cross-origin/xhr.http.html new file mode 100644 index 0000000000..c8cd8582d4 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/a-tag.http.html new file mode 100644 index 0000000000..13c7c76c22 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/a-tag.http.html @@ -0,0 +1,107 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/fetch.http.html new file mode 100644 index 0000000000..dec9d7a970 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/iframe-tag.http.html new file mode 100644 index 0000000000..5a491f1ba4 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/img-tag.http.html new file mode 100644 index 0000000000..f6f1ff0a60 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/script-tag.http.html new file mode 100644 index 0000000000..589dc4c12c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..3d10da188f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..52212670b9 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-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/iframe.http-rp/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-classic.http.html new file mode 100644 index 0000000000..d23ebf7dad --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/worker-module.http.html new file mode 100644 index 0000000000..93daddf304 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/strict-origin/xhr.http.html new file mode 100644 index 0000000000..be9b71f695 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/a-tag.http.html new file mode 100644 index 0000000000..34a7a49e7c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/a-tag.http.html @@ -0,0 +1,107 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/fetch.http.html new file mode 100644 index 0000000000..21cd62f1e8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/iframe-tag.http.html new file mode 100644 index 0000000000..8ba4ffabf0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/img-tag.http.html new file mode 100644 index 0000000000..092fd4fc4d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/script-tag.http.html new file mode 100644 index 0000000000..4d50b3b90c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-classic.http.html new file mode 100644 index 0000000000..952dc99dd2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [ + { + "deliveryType": "http-rp", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-module.http.html new file mode 100644 index 0000000000..6712399a63 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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/iframe.http-rp/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-classic.http.html new file mode 100644 index 0000000000..4bc6031699 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/worker-module.http.html new file mode 100644 index 0000000000..05f15a98e9 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unsafe-url/xhr.http.html new file mode 100644 index 0000000000..1d28925229 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/a-tag.http.html new file mode 100644 index 0000000000..97ecbd9b1c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/a-tag.http.html @@ -0,0 +1,83 @@ +<!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": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/fetch.http.html new file mode 100644 index 0000000000..c9e6568b4e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/iframe-tag.http.html new file mode 100644 index 0000000000..8899ecd0c6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/iframe-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/img-tag.http.html new file mode 100644 index 0000000000..26c803da6b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/img-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/script-tag.http.html new file mode 100644 index 0000000000..96c068d050 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/script-tag.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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag 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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-classic.http.html new file mode 100644 index 0000000000..8ed80c689c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-module.http.html new file mode 100644 index 0000000000..c5b8979ba0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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": "iframe" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-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/iframe.http-rp/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-classic.http.html new file mode 100644 index 0000000000..de239fa7de --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/worker-module.http.html new file mode 100644 index 0000000000..05d0a51b7c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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/iframe.http-rp/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/iframe.http-rp/unset/xhr.http.html new file mode 100644 index 0000000000..eee8742db8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/iframe.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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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": "iframe" + } + ], + "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> |