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/srcdoc-inherit.meta | |
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/srcdoc-inherit.meta')
130 files changed, 16855 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/a-tag.http.html new file mode 100644 index 0000000000..820d4cf0ec --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/fetch.http.html new file mode 100644 index 0000000000..1fcc0e5006 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/iframe-tag.http.html new file mode 100644 index 0000000000..7f28cc13da --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/img-tag.http.html new file mode 100644 index 0000000000..eb2d519ce5 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/script-tag.http.html new file mode 100644 index 0000000000..1167cfd125 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-classic.http.html new file mode 100644 index 0000000000..67972ef771 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-module.http.html new file mode 100644 index 0000000000..ee76c6c122 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-classic.http.html new file mode 100644 index 0000000000..fe9c6561ba --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-module.http.html new file mode 100644 index 0000000000..f834ecc6ae --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/xhr.http.html new file mode 100644 index 0000000000..e6bf9e04f9 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/always/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="always"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/a-tag.http.html new file mode 100644 index 0000000000..e74fad3b63 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/fetch.http.html new file mode 100644 index 0000000000..e71aabe8d6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/iframe-tag.http.html new file mode 100644 index 0000000000..99cf044f15 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/img-tag.http.html new file mode 100644 index 0000000000..0075dd051c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/script-tag.http.html new file mode 100644 index 0000000000..e0cdcf4ff9 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-classic.http.html new file mode 100644 index 0000000000..3351a49e1c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-module.http.html new file mode 100644 index 0000000000..b8d5044bc7 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-classic.http.html new file mode 100644 index 0000000000..5e3ffcaf23 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-module.http.html new file mode 100644 index 0000000000..1b5a55cdb2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/xhr.http.html new file mode 100644 index 0000000000..0cdbf28b42 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/default/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="default"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/a-tag.http.html new file mode 100644 index 0000000000..7555f25db8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/fetch.http.html new file mode 100644 index 0000000000..29a849cbbd --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/iframe-tag.http.html new file mode 100644 index 0000000000..d6a0c4f31c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/img-tag.http.html new file mode 100644 index 0000000000..b6eef75566 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/script-tag.http.html new file mode 100644 index 0000000000..b9be802312 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-classic.http.html new file mode 100644 index 0000000000..1ccc8b7a15 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-module.http.html new file mode 100644 index 0000000000..fd201609c8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-classic.http.html new file mode 100644 index 0000000000..55357061f7 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-module.http.html new file mode 100644 index 0000000000..bf397f451f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/xhr.http.html new file mode 100644 index 0000000000..2ef0d4738c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/never/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="never"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/a-tag.http.html new file mode 100644 index 0000000000..f99b8ab039 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/fetch.http.html new file mode 100644 index 0000000000..b0843010b7 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/iframe-tag.http.html new file mode 100644 index 0000000000..70b6f86033 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/img-tag.http.html new file mode 100644 index 0000000000..5d74b8662e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/script-tag.http.html new file mode 100644 index 0000000000..9ad1c79169 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-classic.http.html new file mode 100644 index 0000000000..3942d10b63 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-module.http.html new file mode 100644 index 0000000000..b97f3311f8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-classic.http.html new file mode 100644 index 0000000000..0cd0c64765 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-module.http.html new file mode 100644 index 0000000000..e163e858d0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/xhr.http.html new file mode 100644 index 0000000000..70aee4ec28 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer-when-downgrade/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="no-referrer-when-downgrade"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/a-tag.http.html new file mode 100644 index 0000000000..36beb5760f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/fetch.http.html new file mode 100644 index 0000000000..ed6e1c7e0c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/iframe-tag.http.html new file mode 100644 index 0000000000..edd06e5c02 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/img-tag.http.html new file mode 100644 index 0000000000..9395c93073 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/script-tag.http.html new file mode 100644 index 0000000000..0d253b26ea --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-classic.http.html new file mode 100644 index 0000000000..106c33c0af --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-module.http.html new file mode 100644 index 0000000000..b14eecdd68 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-classic.http.html new file mode 100644 index 0000000000..e939ffff98 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-module.http.html new file mode 100644 index 0000000000..fb3fba8ef6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/xhr.http.html new file mode 100644 index 0000000000..b8a8134149 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/no-referrer/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="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": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/a-tag.http.html new file mode 100644 index 0000000000..44879f5d1f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/fetch.http.html new file mode 100644 index 0000000000..0142222032 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/iframe-tag.http.html new file mode 100644 index 0000000000..cc80c5b686 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/img-tag.http.html new file mode 100644 index 0000000000..5aae8d8106 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/script-tag.http.html new file mode 100644 index 0000000000..0cbe39c632 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..6e5f40d542 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..bc8914ff1b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-classic.http.html new file mode 100644 index 0000000000..ebbde3683b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-module.http.html new file mode 100644 index 0000000000..55eb25bc24 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/xhr.http.html new file mode 100644 index 0000000000..d5ecdddf67 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-cross-origin/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/a-tag.http.html new file mode 100644 index 0000000000..71b8965db0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/fetch.http.html new file mode 100644 index 0000000000..c1baef7000 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/iframe-tag.http.html new file mode 100644 index 0000000000..7a76a2723d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/img-tag.http.html new file mode 100644 index 0000000000..689b775fa8 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/script-tag.http.html new file mode 100644 index 0000000000..a8a9b08e9a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-classic.http.html new file mode 100644 index 0000000000..def1c27922 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-module.http.html new file mode 100644 index 0000000000..d647061a27 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-classic.http.html new file mode 100644 index 0000000000..413a7923d5 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-module.http.html new file mode 100644 index 0000000000..710457c5f0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/xhr.http.html new file mode 100644 index 0000000000..b8b6e257be --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin-when-crossorigin/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin-when-crossorigin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/a-tag.http.html new file mode 100644 index 0000000000..53d4decc35 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/fetch.http.html new file mode 100644 index 0000000000..2bb4704f45 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/iframe-tag.http.html new file mode 100644 index 0000000000..97d69ffe1c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/img-tag.http.html new file mode 100644 index 0000000000..ba49c9c8dd --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/script-tag.http.html new file mode 100644 index 0000000000..d1eb996cc6 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..972f0c0507 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-module.http.html new file mode 100644 index 0000000000..1cbe83cc0a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-classic.http.html new file mode 100644 index 0000000000..d90cdc4fbe --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-module.http.html new file mode 100644 index 0000000000..eb55830303 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/xhr.http.html new file mode 100644 index 0000000000..3e743c30e3 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/origin/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/a-tag.http.html new file mode 100644 index 0000000000..121fb003b4 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/a-tag.http.html @@ -0,0 +1,68 @@ +<!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="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/fetch.http.html new file mode 100644 index 0000000000..9ae62490b4 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/fetch.http.html @@ -0,0 +1,173 @@ +<!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="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/iframe-tag.http.html new file mode 100644 index 0000000000..d197af252e --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/iframe-tag.http.html @@ -0,0 +1,173 @@ +<!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="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for iframe-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/img-tag.http.html new file mode 100644 index 0000000000..5745f609da --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/img-tag.http.html @@ -0,0 +1,173 @@ +<!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="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for img-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/script-tag.http.html new file mode 100644 index 0000000000..b60fb20b58 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/script-tag.http.html @@ -0,0 +1,173 @@ +<!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="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for script-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..ef7ecf3652 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..001be4af97 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-classic.http.html new file mode 100644 index 0000000000..58c04ab190 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-module.http.html new file mode 100644 index 0000000000..32ed0a93dc --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/xhr.http.html new file mode 100644 index 0000000000..924d350cb5 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/same-origin/xhr.http.html @@ -0,0 +1,173 @@ +<!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="same-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "omitted", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "omitted", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects omitted for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/a-tag.http.html new file mode 100644 index 0000000000..c0daad593b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/fetch.http.html new file mode 100644 index 0000000000..35d7ea426b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/iframe-tag.http.html new file mode 100644 index 0000000000..a7ee5d9e24 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/img-tag.http.html new file mode 100644 index 0000000000..c769737361 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/script-tag.http.html new file mode 100644 index 0000000000..76174d3c21 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..8288d86454 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..57477ebed0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-classic.http.html new file mode 100644 index 0000000000..62330f80d0 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-module.http.html new file mode 100644 index 0000000000..6d3f199365 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/xhr.http.html new file mode 100644 index 0000000000..a6829c2b3d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin-when-cross-origin/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin-when-cross-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/a-tag.http.html new file mode 100644 index 0000000000..2c14a70c27 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/fetch.http.html new file mode 100644 index 0000000000..342365da7f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/iframe-tag.http.html new file mode 100644 index 0000000000..be4d7494f5 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/img-tag.http.html new file mode 100644 index 0000000000..94e9835552 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/script-tag.http.html new file mode 100644 index 0000000000..4b67d45c7b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-classic.http.html new file mode 100644 index 0000000000..f77d2607ff --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-module.http.html new file mode 100644 index 0000000000..e73467fa7a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-classic.http.html new file mode 100644 index 0000000000..9bcc3ab645 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-module.http.html new file mode 100644 index 0000000000..72e2b97e3b --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/xhr.http.html new file mode 100644 index 0000000000..793fe211db --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/strict-origin/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="strict-origin"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/a-tag.http.html new file mode 100644 index 0000000000..3815612c67 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/a-tag.http.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/fetch.http.html new file mode 100644 index 0000000000..aee1cef03d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/fetch.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/iframe-tag.http.html new file mode 100644 index 0000000000..f978f53485 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/iframe-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/img-tag.http.html new file mode 100644 index 0000000000..df369004ac --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/img-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/script-tag.http.html new file mode 100644 index 0000000000..62b04cd422 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/script-tag.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-classic.http.html new file mode 100644 index 0000000000..4403317863 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-module.http.html new file mode 100644 index 0000000000..c6b1d19175 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/sharedworker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-classic.http.html new file mode 100644 index 0000000000..9a10d868f1 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-classic.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-module.http.html new file mode 100644 index 0000000000..8625bc2be3 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/worker-module.http.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/xhr.http.html new file mode 100644 index 0000000000..b5e6906ca4 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unsafe-url/xhr.http.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec referrer-policy/` --> +<html> + <head> + <meta charset="utf-8"> + <meta name="timeout" content="long"> + <meta name="referrer" content="unsafe-url"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/a-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/a-tag.http.html new file mode 100644 index 0000000000..6ed5f3bb75 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/a-tag.http.html @@ -0,0 +1,82 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for a-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "a-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/fetch.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/fetch.http.html new file mode 100644 index 0000000000..6ce6800ed1 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/fetch.http.html @@ -0,0 +1,202 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "fetch", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/iframe-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/iframe-tag.http.html new file mode 100644 index 0000000000..6a0c528686 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/iframe-tag.http.html @@ -0,0 +1,202 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for iframe-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "iframe-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for iframe-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/img-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/img-tag.http.html new file mode 100644 index 0000000000..aed278716d --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/img-tag.http.html @@ -0,0 +1,202 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for img-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "img-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for img-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/script-tag.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/script-tag.http.html new file mode 100644 index 0000000000..74212a61fb --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/script-tag.http.html @@ -0,0 +1,202 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for script-tag to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "script-tag", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for script-tag to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-classic.http.html new file mode 100644 index 0000000000..de1c533bfc --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-classic.http.html @@ -0,0 +1,52 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-module.http.html new file mode 100644 index 0000000000..c088ac04d7 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/sharedworker-module.http.html @@ -0,0 +1,52 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "sharedworker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for sharedworker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-classic.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-classic.http.html new file mode 100644 index 0000000000..8433c4d9df --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-classic.http.html @@ -0,0 +1,52 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-classic", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-module.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-module.http.html new file mode 100644 index 0000000000..bc0657d31c --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/worker-module.http.html @@ -0,0 +1,52 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "worker-module", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/xhr.http.html b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/xhr.http.html new file mode 100644 index 0000000000..a54c8dec65 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/gen/srcdoc-inherit.meta/unset/xhr.http.html @@ -0,0 +1,202 @@ +<!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"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/security-features/resources/common.sub.js"></script> + <script src="../../../generic/test-case.sub.js"></script> + </head> + <body> + <script> + TestCase( + [ + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "cross-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to cross-https origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-http", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-http origin and swap-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and no-redirect redirection from http context." + }, + { + "expectation": "origin", + "origin": "same-https", + "redirection": "swap-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects origin for xhr to same-https origin and swap-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "keep-origin", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context." + }, + { + "expectation": "stripped-referrer", + "origin": "same-http", + "redirection": "no-redirect", + "source_context_list": [ + { + "policyDeliveries": [], + "sourceContextType": "srcdoc" + } + ], + "source_scheme": "http", + "subresource": "xhr", + "subresource_policy_deliveries": [], + "test_description": "Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context." + } + ], + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> |