diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/referrer-policy/gen/req.attr | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/referrer-policy/gen/req.attr')
40 files changed, 7432 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag.http.html new file mode 100644 index 0000000000..ae516266c8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/a-tag.http.html @@ -0,0 +1,87 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "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/req.attr/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/iframe-tag.http.html new file mode 100644 index 0000000000..90cc69bdb5 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/iframe-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "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/req.attr/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/img-tag.http.html new file mode 100644 index 0000000000..67d0496aee --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/img-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "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/req.attr/no-referrer-when-downgrade/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..809bb23ef6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag-dynamic-import.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import 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/req.attr/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag.http.html new file mode 100644 index 0000000000..847cc79171 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer-when-downgrade/script-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer-when-downgrade" + } + ], + "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/req.attr/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/a-tag.http.html new file mode 100644 index 0000000000..ab7cd57f3d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/a-tag.http.html @@ -0,0 +1,87 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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/req.attr/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/iframe-tag.http.html new file mode 100644 index 0000000000..e9dfa7da6d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/iframe-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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/req.attr/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/img-tag.http.html new file mode 100644 index 0000000000..61fecbcb0b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/img-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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/req.attr/no-referrer/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..a362bbbcb6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag-dynamic-import.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import 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/req.attr/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag.http.html new file mode 100644 index 0000000000..1e23802ced --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/no-referrer/script-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "no-referrer" + } + ], + "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/req.attr/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/a-tag.http.html new file mode 100644 index 0000000000..15d69f5f5c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/a-tag.http.html @@ -0,0 +1,87 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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/req.attr/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/iframe-tag.http.html new file mode 100644 index 0000000000..e6a685a320 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/iframe-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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/req.attr/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/img-tag.http.html new file mode 100644 index 0000000000..1dacc8b082 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/img-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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/req.attr/origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..f4a932e07e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag-dynamic-import.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import 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/req.attr/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag.http.html new file mode 100644 index 0000000000..6130676892 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin-when-cross-origin/script-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin-when-cross-origin" + } + ], + "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/req.attr/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/a-tag.http.html new file mode 100644 index 0000000000..5fcb8420dc --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/a-tag.http.html @@ -0,0 +1,87 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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/req.attr/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/iframe-tag.http.html new file mode 100644 index 0000000000..7f8a5779ff --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/iframe-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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/req.attr/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/img-tag.http.html new file mode 100644 index 0000000000..b0257fce6b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/img-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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/req.attr/origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..5d28404865 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag-dynamic-import.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import 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/req.attr/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag.http.html new file mode 100644 index 0000000000..208f3af38e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/origin/script-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "origin" + } + ], + "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/req.attr/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/a-tag.http.html new file mode 100644 index 0000000000..049c25897a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/a-tag.http.html @@ -0,0 +1,71 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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/req.attr/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/iframe-tag.http.html new file mode 100644 index 0000000000..9d117a12f7 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/iframe-tag.http.html @@ -0,0 +1,183 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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/req.attr/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/img-tag.http.html new file mode 100644 index 0000000000..2008858276 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/img-tag.http.html @@ -0,0 +1,183 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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/req.attr/same-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..1b35dd4b35 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag-dynamic-import.http.html @@ -0,0 +1,183 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import 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/req.attr/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag.http.html new file mode 100644 index 0000000000..dfc67c6a1f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/same-origin/script-tag.http.html @@ -0,0 +1,183 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "same-origin" + } + ], + "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/req.attr/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/a-tag.http.html new file mode 100644 index 0000000000..7522380a0f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/a-tag.http.html @@ -0,0 +1,87 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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/req.attr/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/iframe-tag.http.html new file mode 100644 index 0000000000..bf5e1eaf14 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/iframe-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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/req.attr/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/img-tag.http.html new file mode 100644 index 0000000000..b16783a5fa --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/img-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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/req.attr/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..f880f0c3b9 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag-dynamic-import.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import 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/req.attr/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag.http.html new file mode 100644 index 0000000000..db85e3a8e8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin-when-cross-origin/script-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin-when-cross-origin" + } + ], + "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/req.attr/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/a-tag.http.html new file mode 100644 index 0000000000..aad8328e33 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/a-tag.http.html @@ -0,0 +1,87 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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/req.attr/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/iframe-tag.http.html new file mode 100644 index 0000000000..bbf242b590 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/iframe-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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/req.attr/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/img-tag.http.html new file mode 100644 index 0000000000..a5a957d78d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/img-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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/req.attr/strict-origin/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..f7899fd6e4 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag-dynamic-import.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "test_description": "Referrer Policy: Expects origin for script-tag-dynamic-import 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/req.attr/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag.http.html new file mode 100644 index 0000000000..75d6afdffb --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/strict-origin/script-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "strict-origin" + } + ], + "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/req.attr/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/a-tag.http.html new file mode 100644 index 0000000000..04e590c37e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/a-tag.http.html @@ -0,0 +1,87 @@ +<!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": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "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/req.attr/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/iframe-tag.http.html new file mode 100644 index 0000000000..4c2a09f18a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/iframe-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "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/req.attr/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/img-tag.http.html new file mode 100644 index 0000000000..b1053ab0e2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/img-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "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/req.attr/unsafe-url/script-tag-dynamic-import.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag-dynamic-import.http.html new file mode 100644 index 0000000000..a944f1e74c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag-dynamic-import.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag-dynamic-import", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag-dynamic-import 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/req.attr/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag.http.html new file mode 100644 index 0000000000..51b0db7d1a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/req.attr/unsafe-url/script-tag.http.html @@ -0,0 +1,215 @@ +<!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": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [ + { + "deliveryType": "attr", + "key": "referrerPolicy", + "value": "unsafe-url" + } + ], + "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> |